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:
parent
7076d5bb2b
commit
50ffb21291
@ -840,6 +840,9 @@ rule AddPackagesAndRepositoryVariablesToContainerScript script : container
|
||||
AddVariableToScript $(script) : resolvePackageDependencies
|
||||
: $(resolvePackageDependencies) ;
|
||||
|
||||
AddVariableToScript $(script) : updateAllPackages
|
||||
: $(HAIKU_UPDATE_ALL_PACKAGES) ;
|
||||
|
||||
# Add variable "systemPackages" with the packages copied/updated.
|
||||
local allPackages = [ on $(container) return $(HAIKU_PACKAGES_IN_IMAGE) ] ;
|
||||
if $(updateOnly) && ! [ IncludeAllTargetsInContainer $(container) ] {
|
||||
|
@ -16,6 +16,7 @@ set -o errexit
|
||||
# imageSize
|
||||
# imageLabel
|
||||
# resolvePackageDependencies
|
||||
# updateAllPackages
|
||||
# updateOnly
|
||||
# dontClearImage
|
||||
# isVMwareImage
|
||||
@ -269,6 +270,15 @@ if [ $isImage ]; then
|
||||
$cd .
|
||||
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 ..."
|
||||
while [ $# -gt 0 ]; do
|
||||
. $1
|
||||
|
Loading…
x
Reference in New Issue
Block a user