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).
This commit is contained in:
Oliver Tappe
2014-07-26 00:35:53 +02:00
parent 42c7371472
commit 1b4510eebf
4 changed files with 21 additions and 26 deletions
+18 -14
View File
@@ -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) ;
+1 -5
View File
@@ -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) {
+1 -6
View File
@@ -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) ;
+1 -1
View File
@@ -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%