diff options
author | Daniel Baumann <daniel@debian.org> | 2011-09-07 17:33:53 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-09-07 17:33:53 +0200 |
commit | 9119f24831c5d7e1b6d971607bd2774ebfb59454 (patch) | |
tree | 73430ca09df8f7f31409311867ff9c00e21efddf /scripts | |
parent | f8a313ac93fb91e7331007a1cf2b1cbc7592e610 (diff) | |
download | vyos-live-build-9119f24831c5d7e1b6d971607bd2774ebfb59454.tar.gz vyos-live-build-9119f24831c5d7e1b6d971607bd2774ebfb59454.zip |
Also respect config/packages for packages to be installed in both chroot and binary.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/lb_binary_debian-installer | 44 | ||||
-rwxr-xr-x | scripts/build/lb_chroot_apt | 4 | ||||
-rwxr-xr-x | scripts/build/lb_chroot_archives | 27 | ||||
-rwxr-xr-x | scripts/build/lb_config | 1 |
4 files changed, 45 insertions, 31 deletions
diff --git a/scripts/build/lb_binary_debian-installer b/scripts/build/lb_binary_debian-installer index 1103a738d..12e072a65 100755 --- a/scripts/build/lb_binary_debian-installer +++ b/scripts/build/lb_binary_debian-installer @@ -446,19 +446,25 @@ then fi # Including local debs - if Find_files config/packages.binary/*_"${LB_ARCHITECTURES}".deb + if Find_files config/packages.binary/*_"${LB_ARCHITECTURES}".deb || config/packages/*_"${LB_ARCHITECTURES}".deb then - for FILE in config/packages.binary/*_"${LB_ARCHITECTURES}".deb + for FILE in config/packages.binary/*_"${LB_ARCHITECTURES}".deb config/packages/*_"${LB_ARCHITECTURES}".deb do - Install_file "${FILE}" "binary/pool/main" + if [ -e "${FILE}" ] + then + Install_file "${FILE}" "binary/pool/main" + fi done fi - if Find_files config/packages.binary/*_all.deb + if Find_files config/packages.binary/*_all.deb || config/packages/*_all.deb then - for FILE in config/packages.binary/*_all.deb + for FILE in config/packages.binary/*_all.deb config/packages/*_all.deb do - Install_file "${FILE}" "binary/pool/main" + if [ -e "${FILE}" ] + then + Install_file "${FILE}" "binary/pool/main" + fi done fi @@ -520,25 +526,31 @@ then cp *.udeb ../cache/packages_debian-installer.udeb # Including local udebs - if Find_files ../config/packages.binary/*_"${LB_ARCHITECTURES}".udeb + if Find_files ../config/packages.binary/*_"${LB_ARCHITECTURES}".udeb || Find_files ../config/packages/*_"${LB_ARCHITECTURES}".udeb then - for FILE in ../config/packages.binary/*_"${LB_ARCHITECTURES}".udeb + for FILE in ../config/packages.binary/*_"${LB_ARCHITECTURES}".udeb ../config/packages/*_"${LB_ARCHITECTURES}".udeb do - Install_file "${FILE}" "pool/main" + if [ -e "${FILE}" ] + then + Install_file "${FILE}" "pool/main" - # Prefer local udebs over downloaded udebs - rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb + # Prefer local udebs over downloaded udebs + rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb + fi done fi - if Find_files ../config/packages.binary/*_all.udeb + if Find_files ../config/packages.binary/*_all.udeb || Find_files ../config/packages/*_all.udeb then - for FILE in ../config/packages.binary/*_all.udeb + for FILE in ../config/packages.binary/*_all.udeb ../config/packages/*_all.udeb do - Install_file "${FILE}" "pool/main" + if [ -e "${FILE}" ] + then + Install_file "${FILE}" "pool/main" - # Prefer local udebs over downloaded udebs - rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb + # Prefer local udebs over downloaded udebs + rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb + fi done fi diff --git a/scripts/build/lb_chroot_apt b/scripts/build/lb_chroot_apt index 5a097c787..6414701d4 100755 --- a/scripts/build/lb_chroot_apt +++ b/scripts/build/lb_chroot_apt @@ -108,7 +108,7 @@ case "${1}" in cp config/chroot_apt/preferences chroot/etc/apt/preferences fi - if Find_files config/packages.chroot/*.deb + if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb then echo >> chroot/etc/apt/preferences echo "# Added by lb_chroot_apt ${@}" >> chroot/etc/apt/preferences @@ -236,7 +236,7 @@ EOF fi fi - if Find_files config/packages.chroot/*.deb + if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb then if [ -f chroot/etc/apt/preferences ] then diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives index f1b22ed88..441d63ff1 100755 --- a/scripts/build/lb_chroot_archives +++ b/scripts/build/lb_chroot_archives @@ -277,39 +277,40 @@ EOF fi # Configure local package repository - if Find_files config/packages.chroot/*.deb + if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb then rm -rf chroot/root/packages mkdir -p chroot/root/packages - if [ "$(stat --printf %d config/packages.chroot)" = "$(stat --printf %d chroot/root/packages)" ] + if [ "$(stat --printf %d config/packages.chroot)" = "$(stat --printf %d chroot/root/packages)" ] || + [ "$(stat --printf %d config/packages)" = "$(stat --printf %d chroot/root/packages)" ] then CP_OPTIONS="-l" fi # Copy packages - if Find_files config/packages.chroot/*_"${LB_ARCHITECTURES}".deb + if Find_files config/packages.chroot/*_"${LB_ARCHITECTURES}".deb || Find_files config/packages/*_"${LB_ARCHITECTURES}".deb then - for FILE in config/packages.chroot/*_"${LB_ARCHITECTURES}".deb + for FILE in config/packages.chroot/*_"${LB_ARCHITECTURES}".deb config/packages/*_"${LB_ARCHITECTURES}".deb do if [ -L "${FILE}" ] then - cp -L config/packages.chroot/*_"${LB_ARCHITECTURES}".deb chroot/root/packages - else - cp ${CP_OPTIONS} config/packages.chroot/*_"${LB_ARCHITECTURES}".deb chroot/root/packages + cp -L "${FILE}" chroot/root/packages + elif [ -e "${FILE}" ] + cp ${CP_OPTIONS} "${FILE}" chroot/root/packages fi done fi - if Find_files config/packages.chroot/*_all.deb + if Find_files config/packages.chroot/*_all.deb || Find_files config/packages/*_all.deb then - for FILE in config/packages.chroot/*_all.deb + for FILE in config/packages.chroot/*_all.deb config/packages/*_all.deb do if [ -L "${FILE}" ] then - cp -L config/packages.chroot/*_all.deb chroot/root/packages - else - cp ${CP_OPTIONS} config/packages.chroot/*_all.deb chroot/root/packages + cp -L "${FILE}" chroot/root/packages + elif [ -e "${FILE}" ] + cp ${CP_OPTIONS} "${FILE}" chroot/root/packages fi done fi @@ -331,7 +332,7 @@ EOF # Installing depends Install_package - # Generate Packages and Packages.gz + # Generate Packages and Packages.gz echo "cd /root/packages && apt-ftparchive packages . > Packages" | Chroot chroot sh gzip -9 -c chroot/root/packages/Packages > chroot/root/packages/Packages.gz diff --git a/scripts/build/lb_config b/scripts/build/lb_config index 7fb878218..d231a7d4b 100755 --- a/scripts/build/lb_config +++ b/scripts/build/lb_config @@ -1163,6 +1163,7 @@ mkdir -p config/chroot_apt mkdir -p config/hooks mkdir -p config/local.chroot mkdir -p config/chroot_local-patches +mkdir -p config/packages mkdir -p config/packages.chroot mkdir -p config/package-lists mkdir -p config/chroot_local-preseed |