Aborting early in chroot_package-lists if no package list is found.

This commit is contained in:
Daniel Baumann 2013-03-27 13:22:58 +01:00
parent d0bb1a3ade
commit 7406724344
1 changed files with 62 additions and 60 deletions

View File

@ -42,11 +42,14 @@ Check_lockfile .lock
Create_lockfile .lock
# Handling local package lists
if ls config/package-lists/*.list > /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
ls config/package-lists/*.list.chroot_${_PASS} > /dev/null 2>&1 )
then
case "${LB_BUILD_WITH_CHROOT}" in
exit 0
fi
case "${LB_BUILD_WITH_CHROOT}" in
true)
# Checking depends
Check_package chroot/usr/bin/grep-aptavail dctrl-tools
@ -65,30 +68,30 @@ then
exit 1
fi
;;
esac
esac
if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
then
if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
then
cp "${LIVE_BUILD}/share/bin/Packages" chroot/bin
else
else
cp /usr/share/live/build/bin/Packages chroot/bin
fi
fi
for LIST in config/package-lists/*.list \
for LIST in config/package-lists/*.list \
config/package-lists/*.list.chroot \
config/package-lists/*.list.chroot_${_PASS}
do
do
if [ -e "${LIST}" ]
then
# Generating package list
Expand_packagelist "$(basename ${LIST})" "config/package-lists" \
>> chroot/root/packages.chroot
fi
done
done
rm -f chroot/bin/Packages
rm -f chroot/bin/Packages
case "${LB_BUILD_WITH_CHROOT}" in
case "${LB_BUILD_WITH_CHROOT}" in
true)
# Removing dctrl-tools again if the user has not installed it
if ! grep -qs dctrl-tools chroot/root/packages.chroot
@ -100,8 +103,7 @@ then
# Saving cache
Save_cache cache/packages.binary
;;
esac
esac
# Creating stage file
Create_stagefile .build/chroot_package-lists.${_PASS}
fi
# Creating stage file
Create_stagefile .build/chroot_package-lists.${_PASS}