summaryrefslogtreecommitdiff
path: root/scripts/build/chroot_package-lists
diff options
context:
space:
mode:
authorColin Watson <cjwatson@ubuntu.com>2012-09-30 09:33:06 +0200
committerDaniel Baumann <daniel@debian.org>2012-09-30 09:38:17 +0200
commitcab0d9e783ef18c334a09e0f1aa141dec0687978 (patch)
tree3b15c3a0231ff750221f6dd1f7e12f8e5bc311b2 /scripts/build/chroot_package-lists
parent2046ad7fdd0aebc26ff3ffb625c4446e83b76b68 (diff)
downloadvyos-live-build-cab0d9e783ef18c334a09e0f1aa141dec0687978.tar.gz
vyos-live-build-cab0d9e783ef18c334a09e0f1aa141dec0687978.zip
If --build-with-chroot is false, run ! lines in package-lists in the host system.
Diffstat (limited to 'scripts/build/chroot_package-lists')
-rwxr-xr-xscripts/build/chroot_package-lists50
1 files changed, 33 insertions, 17 deletions
diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists
index b85c00059..8a7f2e779 100755
--- a/scripts/build/chroot_package-lists
+++ b/scripts/build/chroot_package-lists
@@ -46,14 +46,26 @@ if ls config/package-lists/*.list > /dev/null 2>&1 || \
ls config/package-lists/*.list.chroot > /dev/null 2>&1 || \
ls config/package-lists/*.list.chroot_${_PASS} > /dev/null 2>&1
then
- # Checking depends
- Check_package chroot/usr/bin/grep-aptavail dctrl-tools
-
- # Restoring cache
- Restore_cache cache/packages.chroot
-
- # Installing depends
- Install_package
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ # Checking depends
+ Check_package chroot/usr/bin/grep-aptavail dctrl-tools
+
+ # Restoring cache
+ Restore_cache cache/packages.chroot
+
+ # Installing depends
+ Install_package
+ ;;
+
+ false)
+ if [ ! -e /usr/bin/grep-aptavail ]; then
+ # dctrl-tools
+ Echo_error "/usr/bin/grep-aptavail - no such file."
+ exit 1
+ fi
+ ;;
+ esac
if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
then
@@ -76,15 +88,19 @@ then
rm -f chroot/bin/Packages
- # Removing dctrl-tools again if the user has not installed it
- if ! grep -qs dctrl-tools chroot/root/packages.chroot
- then
- # Removing depends
- Remove_package
- fi
-
- # Saving cache
- Save_cache cache/packages.binary
+ case "${LB_BUILD_WITH_CHROOT}" in
+ true)
+ # Removing dctrl-tools again if the user has not installed it
+ if ! grep -qs dctrl-tools chroot/root/packages.chroot
+ then
+ # Removing depends
+ Remove_package
+ fi
+
+ # Saving cache
+ Save_cache cache/packages.binary
+ ;;
+ esac
# Creating stage file
Create_stagefile .build/chroot_package-lists.${_PASS}