summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog9
-rw-r--r--functions5
2 files changed, 14 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5911665..0350d3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+debootstrap (1.0.69) UNRELEASED; urgency=medium
+
+ * Make sure to deduplicate package list in download_release to avoid
+ issues while counting downloaded packages. The failure path could lead
+ to printing some strange integer (Closes: #709751, #768445, #785276).
+ This was reported to mostly happen whenever --no-resolve-deps is used.
+
+ -- Cyril Brulebois <kibi@debian.org> Thu, 14 May 2015 23:52:52 +0200
+
debootstrap (1.0.68) unstable; urgency=medium
[ Steven Chamberlain ]
diff --git a/functions b/functions
index bf999f1..c8d7787 100644
--- a/functions
+++ b/functions
@@ -662,6 +662,11 @@ download_release () {
local totaldebs=0
local leftoverdebs="$*"
+
+ # Fix possible duplicate package names, which would screw up counts:
+ leftoverdebs=$(printf "$leftoverdebs"|sed 's/ /\n/g'|sort -u|xargs)
+ numdebs=$(printf "$leftoverdebs"|wc -w)
+
for c in $COMPONENTS; do
if [ "$countdebs" -ge "$numdebs" ]; then break; fi