bootstrap image: build needed source packages and add them

* IsPackageAvailable, FetchPackage: Add flags parameter. The only
  flag supported ATM is nameResolved, indicating that the specified
  package name does not need to be resolved with respect to a secondary
  architecture anymore.
* Add build profile action "build-package-list". As an argument the
  file to which the list of all packages needed for the image is
  written. The rule BuildHaikuImagePackageList implements the action.
* BuildBootstrapRepositoryConfig: Does now require the variable
  HAIKU_REPOSITORY_TREE_PATH to be set on the config file target instead
  of hard-coding the path. Allows reuse of the actions.
* Add rules BuildHaikuPortsSourcePackageDirectory and
  BuildHaikuPortsRepositoryConfig. The former builds all HaikuPorts
  source packages needed to build the packages for an alpha image. The
  latter generates a haikuports.conf file for use on the bootstrap
  Haiku.
* HaikuImageBootstrap: Add directory /boot/home/haikuports which
  contains a subdirectory with the source packages and a
  haikuports.conf.
This commit is contained in:
Ingo Weinhold
2013-08-06 23:02:10 +02:00
parent 384230184e
commit c965ee60b5
5 changed files with 172 additions and 5 deletions
+26
View File
@@ -1035,6 +1035,32 @@ rule IsHaikuImagePackageAdded package
}
rule BuildHaikuImagePackageList target
{
if ! $(target) {
return ;
}
# get the file names of all added packages
local packageFiles ;
local package ;
for package in $(HAIKU_ADDED_PACKAGES) {
packageFiles += [ FetchPackage $(package) : nameResolved ] ;
}
# extract the versioned package names (without revision)
packageFiles = [ Match "(.*)-[^-]*-[^-]*" : $(packageFiles:B) ] ;
HAIKU_IMAGE_PACKAGES on $(target) = $(packageFiles) ;
}
actions BuildHaikuImagePackageList
{
echo $(HAIKU_IMAGE_PACKAGES) | xargs -n 1 echo | LC_ALL=C sort -u > $(1)
}
rule InstallSourceArchive file : url
{
if $(HAIKU_INCLUDE_SOURCES) = 1 {