[haiku-commits] haiku: hrev47570 - build/jam build/jam/repositories build/jam/images/definitions src/data/repository_infos src/kits/package

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 26 Jul 2014 00:38:36 +0200 (CEST)

hrev47570 adds 2 changesets to branch 'master'
old head: a0209a665a1e378b4c39ab436f880438183749b4
new head: 1b4510eebfb4aa1975fef0c46f90f4a1dfd71159
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=1b4510e+%5Ea0209a6

----------------------------------------------------------------------------

42c7371: Let Package-Kit's FetchFileJob handle redirects.
  
  * additionally, drop duplicate setting of CURLOPT_PROGRESSFUNCTION.

1b4510e: Put haiku repository onto image.
  
  * Now that system updates seem to work properly, put the haiku
    repository config and cache file onto the image automatically.
  * Adjust URL of haiku repository (it is currently redirected
    to some other URL at download.haiku-os.org, but that will be
    changed later).

                                    [ Oliver Tappe <zooey@xxxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

5 files changed, 22 insertions(+), 28 deletions(-)
build/jam/RepositoryRules            | 32 ++++++++++++++++++--------------
build/jam/images/definitions/regular |  6 +-----
build/jam/repositories/Haiku         |  7 +------
src/data/repository_infos/haiku      |  2 +-
src/kits/package/FetchFileJob.cpp    |  3 +--

############################################################################

Commit:      42c73714726c54c33b5dd9dbfb9c5cdf24445215
URL:         http://cgit.haiku-os.org/haiku/commit/?id=42c7371
Author:      Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
Date:        Fri Jul 25 22:20:13 2014 UTC

Let Package-Kit's FetchFileJob handle redirects.

* additionally, drop duplicate setting of CURLOPT_PROGRESSFUNCTION.

----------------------------------------------------------------------------

diff --git a/src/kits/package/FetchFileJob.cpp 
b/src/kits/package/FetchFileJob.cpp
index acf0142..4a4959a 100644
--- a/src/kits/package/FetchFileJob.cpp
+++ b/src/kits/package/FetchFileJob.cpp
@@ -95,8 +95,7 @@ FetchFileJob::Execute()
        if (result != CURLE_OK)
                return B_ERROR;
 
-       result = curl_easy_setopt(handle, CURLOPT_PROGRESSFUNCTION,
-               &_ProgressCallback);
+       result = curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
        if (result != CURLE_OK)
                return B_ERROR;
 

############################################################################

Revision:    hrev47570
Commit:      1b4510eebfb4aa1975fef0c46f90f4a1dfd71159
URL:         http://cgit.haiku-os.org/haiku/commit/?id=1b4510e
Author:      Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
Date:        Fri Jul 25 22:35:53 2014 UTC

Put haiku repository onto image.

* Now that system updates seem to work properly, put the haiku
  repository config and cache file onto the image automatically.
* Adjust URL of haiku repository (it is currently redirected
  to some other URL at download.haiku-os.org, but that will be
  changed later).

----------------------------------------------------------------------------

diff --git a/build/jam/RepositoryRules b/build/jam/RepositoryRules
index 98cdc01..4520b81 100644
--- a/build/jam/RepositoryRules
+++ b/build/jam/RepositoryRules
@@ -744,8 +744,7 @@ actions BuildRemoteHaikuPortsRepository1
 }
 
 
-rule HaikuRepository repository : repoInfoTemplate : packages : url
-       : versionFile
+rule HaikuRepository repository : repoInfoTemplate : packages
 {
        # HaikuRepository <repository> : <repoInfoTemplate> : <packages>
        #       [ : <url> [ : <versionFile> ] ] ;
@@ -757,10 +756,6 @@ rule HaikuRepository repository : repoInfoTemplate : 
packages : url
        #       meta data files.
        # <repoInfoTemplate> - The repository info template file to be used.
        # <packages> - The packages to be added to the repository.
-       # <url> - Optional repository URL for the repository config file to be
-       #       created. If not specified the one from the repository info is 
used.
-       # <versionFile> - Optional file containing the version string that shall
-       #       replace the "$version" placeholder in <url> (if any).
 
        local architecture = $(HAIKU_PACKAGING_ARCH) ;
        local secondaryArchitecture ;
@@ -771,18 +766,27 @@ rule HaikuRepository repository : repoInfoTemplate : 
packages : url
        local repositoriesDir = 
$(HAIKU_PACKAGE_REPOSITORIES_DIR_$(architecture)) ;
 
        # build the repository info
-       local repoInfo = $(repository:G=repository-info)-info ;
-       MakeLocate $(repoInfo) : $(repositoriesDir) ;
-       PreprocessPackageOrRepositoryInfo $(repoInfo) : $(repoInfoTemplate)
+       local repositoryInfo = $(repository:G=repository-info)-info ;
+       MakeLocate $(repositoryInfo) : $(repositoriesDir) ;
+       PreprocessPackageOrRepositoryInfo $(repositoryInfo) : 
$(repoInfoTemplate)
                : $(architecture) : $(secondaryArchitecture) ;
 
        # build the respository config
        local repositoryConfig = $(repository:G=repository-config)-config ;
        MakeLocate $(repositoryConfig) : $(repositoriesDir) ;
-       RepositoryConfig $(repositoryConfig) : $(repoInfo) : $(url)
-               : $(versionFile) ;
+       RepositoryConfig $(repositoryConfig) : $(repositoryInfo) ;
        HAIKU_REPOSITORY_CONFIG_FILE on $(repository) = $(repositoryConfig) ;
 
+       # setup the repository cache file
+       local repositoryCache = $(repository:B=repo:G=repository-cache) ;
+       MakeLocate $(repositoryCache)
+               : [ FDirName $(repositoriesDir) $(repository:G=) ] ;
+       Depends $(repositoryCache) : $(repository) ;
+       HAIKU_REPOSITORY_CACHE_FILE on $(repository) = $(repositoryCache) ;
+
+       # add the repository to the list of known package repositories
+       HAIKU_REPOSITORIES += $(repository) ;
+
        # prepare the script that initializes the shell variables
        local initVariablesScript = $(repository)-repository-init-vars ;
        MakeLocate $(initVariablesScript)
@@ -802,10 +806,10 @@ rule HaikuRepository repository : repoInfoTemplate : 
packages : url
        local mainScript = build_haiku_repository ;
        SEARCH on $(mainScript) = [ FDirName $(HAIKU_TOP) build scripts ] ;
 
-       Depends $(repository) : $(mainScript) $(initVariablesScript) $(repoInfo)
-               $(packages) ;
+       Depends $(repository) : $(mainScript) $(initVariablesScript)
+               $(repositoryInfo) $(packages) ;
        HaikuRepository1 $(repository) : $(mainScript) $(initVariablesScript)
-               $(repoInfo) $(packages) ;
+               $(repositoryInfo) $(packages) ;
        Always $(repository) ;
 
        RmTemps $(repository) : $(initVariablesScript) ;
diff --git a/build/jam/images/definitions/regular 
b/build/jam/images/definitions/regular
index 945748b..b5d5ef1 100644
--- a/build/jam/images/definitions/regular
+++ b/build/jam/images/definitions/regular
@@ -271,12 +271,8 @@ CopyDirectoryToHaikuImage home config settings Media
        : dvb : -x Jamfile ;
 
 # repository config and cache files
-local repositories = $(HAIKU_REPOSITORIES) ;
-if $(HAIKU_ADD_HAIKU_REPOSITORY_CONFIG) {
-       repositories += <repository>haiku ;
-}
 local repository ;
-for repository in $(repositories) {
+for repository in $(HAIKU_REPOSITORIES) {
        local config = [ on $(repository) return 
$(HAIKU_REPOSITORY_CONFIG_FILE) ] ;
        local cache = [ on $(repository) return $(HAIKU_REPOSITORY_CACHE_FILE) 
] ;
        if $(HAIKU_UPDATE_ALL_PACKAGES) {
diff --git a/build/jam/repositories/Haiku b/build/jam/repositories/Haiku
index 2a16026..f64c566 100644
--- a/build/jam/repositories/Haiku
+++ b/build/jam/repositories/Haiku
@@ -24,9 +24,4 @@ if $(TARGET_PACKAGING_ARCH) != x86_gcc2 || $(secondaryArchs) {
        packages += webpositive ;
 }
 
-HaikuRepository $(haikuRepository) : $(repoInfo) : $(packages:S=.hpkg)
-       : 
http://www.haiku-files.org/haiku/master/repo/$(TARGET_PACKAGING_ARCH)/$(HAIKU_VERSION)_$version
-       : [ DetermineEffectiveHaikuRevision ]
-               # TODO: Remove the URL and the version file argument once the 
repository
-               # is available on haiku-os.org as specified in the repository 
info.
-       ;
+HaikuRepository $(haikuRepository) : $(repoInfo) : $(packages:S=.hpkg) ;
diff --git a/src/data/repository_infos/haiku b/src/data/repository_infos/haiku
index cedaaff..a6501ab 100644
--- a/src/data/repository_infos/haiku
+++ b/src/data/repository_infos/haiku
@@ -2,5 +2,5 @@ name Haiku
 vendor "Haiku Project"
 summary "The Haiku repository (for Haiku %HAIKU_VERSION_NO_REVISION%)"
 priority 1
-url 
http://packages.haiku-os.org/haiku/master/repo/%HAIKU_PACKAGING_ARCH%/%HAIKU_VERSION_NO_REVISION%
+url 
http://packages.haiku-os.org/haiku/master/%HAIKU_PACKAGING_ARCH%/%HAIKU_VERSION_NO_REVISION%
 architecture %HAIKU_PACKAGING_ARCH%


Other related posts: