From 7c092d4d865eb53029c28fb5b1ddfbbada85899f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 21 Apr 2013 01:44:21 +0200 Subject: [PATCH] Add build profile action update-packages Equivalent to "jam && jam @... ", i.e. it makes sure all hpkgs that are supposed to be in the image are rebuilt respectively downloaded and copied to the image. It doesn't remove old packages nor the activation files -- that still has to be done manually. --- build/jam/ImageRules | 3 +++ build/jam/MiscRules | 6 ++++++ build/jam/PackageRules | 2 ++ 3 files changed, 11 insertions(+) diff --git a/build/jam/ImageRules b/build/jam/ImageRules index 2420a1e934..c3cc52893a 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -928,6 +928,9 @@ rule InstallOptionalHaikuImagePackage url : dirTokens : isCDPackage local archiveFile = [ DownloadFile $(package) : $(url) ] ; if $(package:S) = .hpkg { + if $(HAIKU_UPDATE_ALL_PACKAGES) { + HAIKU_INCLUDE_IN_IMAGE on $(archiveFile) = 1 ; + } AddFilesToHaikuImage $(dirTokens) : $(archiveFile) ; } else if ( $(isCDPackage) = true || $(isCDPackage) = 1 ) && $(HAIKU_CD_NAME) { diff --git a/build/jam/MiscRules b/build/jam/MiscRules index 326f0b90d1..034efeb1e9 100644 --- a/build/jam/MiscRules +++ b/build/jam/MiscRules @@ -407,6 +407,12 @@ rule DefineBuildProfile name : type : path { HAIKU_INCLUDE_IN_PACKAGES = 1 ; } + case "update-packages" : { + JAM_TARGETS = $(buildTarget) ; + SetUpdateHaikuImageOnly 1 ; + HAIKU_UPDATE_ALL_PACKAGES = 1 ; + } + case "mount" : { if $(type) in "install" "cd-image" { Exit "Build action \"mount\" not supported for profile type" diff --git a/build/jam/PackageRules b/build/jam/PackageRules index 86e3ed7847..00af4501b2 100644 --- a/build/jam/PackageRules +++ b/build/jam/PackageRules @@ -279,6 +279,8 @@ rule HaikuPackage package HAIKU_CONTAINER_UPDATE_ONLY on $(package) = 1 ; HAIKU_CONTAINER_INHERIT_UPDATE_VARIABLE on $(package) = HAIKU_INCLUDE_IN_IMAGE ; + } else if $(HAIKU_UPDATE_ALL_PACKAGES) { + HAIKU_INCLUDE_IN_IMAGE on $(package) = 1 ; } HAIKU_CONTAINER_ALWAYS_CREATE_DIRECTORIES on $(package) = 1 ;