summaryrefslogtreecommitdiff
path: root/scripts/build/lb_chroot_archives
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-09-07 17:33:53 +0200
committerDaniel Baumann <daniel@debian.org>2011-09-07 17:33:53 +0200
commit9119f24831c5d7e1b6d971607bd2774ebfb59454 (patch)
tree73430ca09df8f7f31409311867ff9c00e21efddf /scripts/build/lb_chroot_archives
parentf8a313ac93fb91e7331007a1cf2b1cbc7592e610 (diff)
downloadvyos-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/build/lb_chroot_archives')
-rwxr-xr-xscripts/build/lb_chroot_archives27
1 files changed, 14 insertions, 13 deletions
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