From 724f5b4dc82d2b77279a8daad715878a14a41090 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 5 Aug 2011 08:53:27 +0200 Subject: Also using definition files without suffix (so that e.g. foo.list is used for both chroot and binary stage). --- scripts/build/lb_binary_local-packagelists | 12 +++++++----- scripts/build/lb_chroot_archives | 24 ++++++++++++++++-------- scripts/build/lb_chroot_local-packagelists | 7 +++++-- scripts/build/lb_chroot_task-lists | 7 +++++-- 4 files changed, 33 insertions(+), 17 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3