Commit a294a46f authored by Raphaël Hertzog's avatar Raphaël Hertzog Committed by Daniel Baumann
Browse files

Properly support empty package lists.

The user might not have created any package list or it might have
created a packages list that end up being empty due to various #if tests.
We should not fail in those cases.
parent 571c8944
......@@ -101,7 +101,7 @@ then
Expand_packagelist "${LIST}" "config/package-lists" > chroot/root/"$(basename ${LIST})"
# Downloading additional packages
Chroot chroot "xargs --arg-file=/root/$(basename ${LIST}) apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb --download-only install"
Chroot chroot "xargs --no-run-if-empty --arg-file=/root/$(basename ${LIST}) apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb --download-only install"
# Remove package list
rm chroot/root/"$(basename ${LIST})"
......@@ -110,6 +110,10 @@ then
for FILE in chroot/binary.deb/archives/*.deb
if [ ! -e ${FILE} ]; then
break # Do nothing if the package lists were empty...
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
SECTION="$(dpkg -f ${FILE} Section | awk '{ print $1 }')"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment