update-{all,packages} build profile action: empty packages dir
... before copying the new contents to the image. This caters to the typical use case of updating an existing Haiku, making manual intervention to get the new packages activated unnecessary. The downside is that manually added packages will be removed as well.
This commit is contained in:
@@ -840,6 +840,9 @@ rule AddPackagesAndRepositoryVariablesToContainerScript script : container
|
|||||||
AddVariableToScript $(script) : resolvePackageDependencies
|
AddVariableToScript $(script) : resolvePackageDependencies
|
||||||
: $(resolvePackageDependencies) ;
|
: $(resolvePackageDependencies) ;
|
||||||
|
|
||||||
|
AddVariableToScript $(script) : updateAllPackages
|
||||||
|
: $(HAIKU_UPDATE_ALL_PACKAGES) ;
|
||||||
|
|
||||||
# Add variable "systemPackages" with the packages copied/updated.
|
# Add variable "systemPackages" with the packages copied/updated.
|
||||||
local allPackages = [ on $(container) return $(HAIKU_PACKAGES_IN_IMAGE) ] ;
|
local allPackages = [ on $(container) return $(HAIKU_PACKAGES_IN_IMAGE) ] ;
|
||||||
if $(updateOnly) && ! [ IncludeAllTargetsInContainer $(container) ] {
|
if $(updateOnly) && ! [ IncludeAllTargetsInContainer $(container) ] {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ set -o errexit
|
|||||||
# imageSize
|
# imageSize
|
||||||
# imageLabel
|
# imageLabel
|
||||||
# resolvePackageDependencies
|
# resolvePackageDependencies
|
||||||
|
# updateAllPackages
|
||||||
# updateOnly
|
# updateOnly
|
||||||
# dontClearImage
|
# dontClearImage
|
||||||
# isVMwareImage
|
# isVMwareImage
|
||||||
@@ -269,6 +270,15 @@ if [ $isImage ]; then
|
|||||||
$cd .
|
$cd .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Clean out the old packages directory, if updating all packages.
|
||||||
|
if [ -n "$updateAllPackages" ]; then
|
||||||
|
echo "Removing old packages ..."
|
||||||
|
$rm -rf "${tPrefix}system/packages"
|
||||||
|
$mkdir -p "${tPrefix}system/packages"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Populating image ..."
|
echo "Populating image ..."
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
. $1
|
. $1
|
||||||
|
|||||||
Reference in New Issue
Block a user