summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2008-09-27 22:33:58 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:42 +0100
commitab1e4ce5a803804edbec20c9c8fbae79f31fa23e (patch)
tree7782e8f892cd866997c57a35f5e63ccae12fed29 /helpers
parent2167cde62096ccb75750cbad86a775265cc478e9 (diff)
downloadlive-build-ab1e4ce5a803804edbec20c9c8fbae79f31fa23e.zip
live-build-ab1e4ce5a803804edbec20c9c8fbae79f31fa23e.tar.gz
Create a "missing-source.txt" file containing missing source packages instead of exiting.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_source_debian26
1 files changed, 25 insertions, 1 deletions
diff --git a/helpers/lh_source_debian b/helpers/lh_source_debian
index a121cd2..247543e 100755
--- a/helpers/lh_source_debian
+++ b/helpers/lh_source_debian
@@ -92,7 +92,31 @@ EOF
;;
esac
-Chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get ${APT_OPTIONS} --download-only source"
+MISSING=""
+
+grep . chroot/root/dpkg-selection.txt | \
+while read PACKAGE
+do
+ if ! Chroot "apt-get ${APT_OPTIONS} --download-only source ${PACKAGE}"
+ then
+ MISSING="${MISSING} ${PACKAGE}"
+ fi
+done
+
+if [ -n "${MISSING}" ]
+then
+ cat > source/missing-source.txt << EOF
+This file contains the list of binary packages that are installed on this live
+system that do not have a corresponding source package.
+
+EOF
+
+ for PACKAGE in ${MISSING}
+ do
+ Chroot "dpkg -l ${PACKAGE}" | tail -n1 >> source/missing-source.txt
+ done
+fi
+
rm -f chroot/root/dpkg-selection.txt
# Sort sources