diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-29 00:36:49 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-29 00:36:49 +0200 |
commit | cdf1bca4867ad78c923637860f00131e13bbd839 (patch) | |
tree | 4d4060cc7a5c4720eabe46c80168104d46b9691f | |
parent | 94fc62e2ff96a8bc7a582b79b0aeff8df1deb4af (diff) | |
download | vyos-live-build-cdf1bca4867ad78c923637860f00131e13bbd839.tar.gz vyos-live-build-cdf1bca4867ad78c923637860f00131e13bbd839.zip |
Optimizing chroot package-lists handling for the cases where it's not used.
-rwxr-xr-x | scripts/build/lb_chroot_package-lists | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/scripts/build/lb_chroot_package-lists b/scripts/build/lb_chroot_package-lists index 4e3aab01d..f38fff7b6 100755 --- a/scripts/build/lb_chroot_package-lists +++ b/scripts/build/lb_chroot_package-lists @@ -41,20 +41,20 @@ Check_lockfile .lock # Creating lock file Create_lockfile .lock -# Checking depends -Check_package chroot/usr/bin/grep-aptavail dctrl-tools - -# Restoring cache -Restore_cache cache/packages.chroot - -# Installing depends -Install_package - # Handling local package lists 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 + for LIST in config/package-lists/*.list \ config/package-lists/*.list.chroot \ config/package-lists/*.list.chroot_${_PASS} @@ -67,16 +67,16 @@ then fi done - # Creating stage file - Create_stagefile .build/chroot_package-lists.${_PASS} -fi + # 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 + # Saving cache + Save_cache cache/packages.binary -# 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 + # Creating stage file + Create_stagefile .build/chroot_package-lists.${_PASS} fi |