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:
Ingo Weinhold
2013-10-05 22:49:48 +02:00
parent 7076d5bb2b
commit 50ffb21291
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -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