summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-08-05 08:53:27 +0200
committerDaniel Baumann <daniel@debian.org>2011-08-08 08:10:07 +0200
commit724f5b4dc82d2b77279a8daad715878a14a41090 (patch)
treec9c7b66ba2422e487d9f3ebd94c6ea56002c27b4
parent8a0da5726657de9024197bdb4c17f35423199a0a (diff)
downloadvyos-live-build-724f5b4dc82d2b77279a8daad715878a14a41090.tar.gz
vyos-live-build-724f5b4dc82d2b77279a8daad715878a14a41090.zip
Also using definition files without suffix (so that e.g. foo.list is used for both chroot and binary stage).
-rwxr-xr-xscripts/build/lb_binary_local-packagelists12
-rwxr-xr-xscripts/build/lb_chroot_archives24
-rwxr-xr-xscripts/build/lb_chroot_local-packagelists7
-rwxr-xr-xscripts/build/lb_chroot_task-lists7
4 files changed, 33 insertions, 17 deletions
diff --git a/scripts/build/lb_binary_local-packagelists b/scripts/build/lb_binary_local-packagelists
index cef60658d..27e2daeb6 100755
--- a/scripts/build/lb_binary_local-packagelists
+++ b/scripts/build/lb_binary_local-packagelists
@@ -38,7 +38,8 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if Find_files config/package-lists/*.list.binary
+if ls config/package-lists/*.list > /dev/null 2>&1 || \
+ ls config/package-lists/*.list.binary > /dev/null 2>&1
then
# Restoring cache
Restore_cache cache/packages_chroot
@@ -53,16 +54,17 @@ then
mv chroot/var/lib/dpkg/status chroot/var/lib/dpkg/status.tmp
touch chroot/var/lib/dpkg/status
- for PACKAGELIST in config/package-lists/*.list.binary
+ for LIST in config/package-lists/*.list \
+ config/package-lists/*.list.binary
do
# Generate package list
- Expand_packagelist "${PACKAGELIST}" "config/package-lists" > chroot/root/"$(basename ${PACKAGELIST})"
+ Expand_packagelist "${LIST}" "config/package-lists" > chroot/root/"$(basename ${LIST})"
# Downloading additional packages
- Chroot chroot "xargs --arg-file=/root/$(basename ${PACKAGELIST}) apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb --download-only install"
+ Chroot chroot "xargs --arg-file=/root/$(basename ${LIST}) apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb --download-only install"
# Remove package list
- rm chroot/root/"$(basename ${PACKAGELIST})"
+ rm chroot/root/"$(basename ${LIST})"
done
for FILE in chroot/binary.deb/archives/*.deb
diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives
index 4de3ef7fd..5c27c1a2c 100755
--- a/scripts/build/lb_chroot_archives
+++ b/scripts/build/lb_chroot_archives
@@ -256,9 +256,11 @@ EOF
fi
# Check local sources.list
- if Find_files config/archives/*.list.chroot
+ if Find_files config/archives/*.list || \
+ Find_files config/archives/*.list.chroot
then
- for FILE in config/archives/*.list.chroot
+ for FILE in config/archives/*.list \
+ config/archives/*.list.chroot
do
sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \
-e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \
@@ -466,9 +468,11 @@ EOF
fi
else # Get fresh indices
# Check local archive keys
- if Find_files config/archives/*.key.chroot
+ if Find_files config/archives/*.key || \
+ Find_files config/archives/*.key.chroot
then
- for FILE in config/archives/*.key.chroot
+ for FILE in config/archives/*.key \
+ config/archives/*.key.chroot
do
cp ${FILE} chroot/root
Chroot chroot "apt-key add /root/$(basename ${FILE})"
@@ -775,9 +779,11 @@ EOF
fi
# Check local sources.list
- if Find_files config/archives/*.list.binary
+ if Find_files config/archives/*.list || \
+ Find_files config/archives/*.list.binary
then
- for FILE in config/archives/*.list.binary
+ for FILE in config/archives/*.list \
+ config/archives/*.list.binary
do
sed -e "s|@DISTRIBUTION@|${LB_DISTRIBUTION}|g" \
-e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \
@@ -788,9 +794,11 @@ EOF
fi
# Check local archive keys
- if Find_files config/archives/*.key.binary
+ if Find_files config/archives/*.key || \
+ Find_files config/archives/*.key.binary
then
- for FILE in config/archives/*.key.binary
+ for FILE in config/archives/*.key \
+ config/archives/*.key.binary
do
cp ${FILE} chroot/root
Chroot chroot "apt-key add /root/$(basename ${FILE})"
diff --git a/scripts/build/lb_chroot_local-packagelists b/scripts/build/lb_chroot_local-packagelists
index eb93af953..fd5adcf2b 100755
--- a/scripts/build/lb_chroot_local-packagelists
+++ b/scripts/build/lb_chroot_local-packagelists
@@ -41,10 +41,13 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if ls config/package-lists/*.list.chroot > /dev/null 2>&1 || \
+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
- for LIST in config/package-lists/*.list.chroot config/package-lists/*.list.chroot_${_PASS}
+ for LIST in config/package-lists/*.list \
+ config/package-lists/*.list.chroot \
+ config/package-lists/*.list.chroot_${_PASS}
do
if [ -e "${LIST}" ]
then
diff --git a/scripts/build/lb_chroot_task-lists b/scripts/build/lb_chroot_task-lists
index 57f5518b1..1377ad1c5 100755
--- a/scripts/build/lb_chroot_task-lists
+++ b/scripts/build/lb_chroot_task-lists
@@ -41,10 +41,13 @@ Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
-if ls config/task-lists/*.list.chroot > /dev/null 2>&1 || \
+if ls config/task-lists/*.list > /dev/null 2>&1 || \
+ ls config/task-lists/*.list.chroot > /dev/null 2>&1 || \
ls config/task-lists/*.list.chroot_${_PASS} > /dev/null 2>&1
then
- for LIST in config/task-lists/*.list.chroot config/task-lists/*.list.chroot_${_PASS}
+ for LIST in config/task-lists/*.list \
+ config/task-lists/*.list.chroot \
+ config/task-lists/*.list.chroot_${_PASS}
do
if [ -e "${LIST}" ]
then