summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2011-04-13 18:42:02 +0100
committerColin Watson <cjwatson@debian.org>2011-04-13 18:42:02 +0100
commit8ca6fafd9030acfc060bb9f6f83b96cb56b4a9fe (patch)
tree5b82d0813fd820e84bbe898d0821d39da1713954
parent92cf330c441260fa28f6277dc63823f6416e2115 (diff)
downloaddebootstrap-8ca6fafd9030acfc060bb9f6f83b96cb56b4a9fe.tar.gz
Resolve dependencies from all requested components (LP: #740167).
-rw-r--r--debian/changelog4
-rw-r--r--functions23
2 files changed, 18 insertions, 9 deletions
diff --git a/debian/changelog b/debian/changelog
index 69d00c4..2b75ae4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
debootstrap (1.0.30) UNRELEASED; urgency=low
+ [ Joey Hess ]
* Recommend debian-archive-keyring, and if it is installed,
default to checking gpg signatures of the Release file against it
when bootstrapping sid, squeeze, wheezy, etch, and lenny.
@@ -14,6 +15,9 @@ debootstrap (1.0.30) UNRELEASED; urgency=low
* Removed the --boot-floppies switch and mode. Assuming this has
not been used in 10 years.
+ [ Colin Watson ]
+ * Resolve dependencies from all requested components (LP: #740167).
+
-- Joey Hess <joeyh@debian.org> Fri, 25 Mar 2011 14:12:43 -0400
debootstrap (1.0.29) unstable; urgency=low
diff --git a/functions b/functions
index b4f74a9..48ba59e 100644
--- a/functions
+++ b/functions
@@ -1124,19 +1124,24 @@ fi
resolve_deps () {
local m1="${MIRRORS%% *}"
- # XXX: I can't think how to deal well with dependency resolution and
- # lots of Packages files. -- aj 2005/06/12
-
- c="${COMPONENTS%% *}"
- local path="dists/$SUITE/$c/binary-$ARCH/Packages"
- local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")"
-
local PKGS="$*"
local ALLPKGS="$PKGS";
local ALLPKGS2="";
while [ "$PKGS" != "" ]; do
- PKGS=$("$PKGDETAILS" GETDEPS "$pkgdest" $PKGS)
- PKGS=$("$PKGDETAILS" PKGS REAL "$pkgdest" $PKGS | sed -n 's/ .*REAL.*$//p')
+ local NEWPKGS=""
+ for c in $COMPONENTS; do
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")"
+ NEWPKGS="$NEWPKGS $("$PKGDETAILS" GETDEPS "$pkgdest" $PKGS)"
+ done
+ PKGS=$(echo "$PKGS $NEWPKGS" | tr ' ' '\n' | sort | uniq)
+ local REALPKGS=""
+ for c in $COMPONENTS; do
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")"
+ REALPKGS="$REALPKGS $("$PKGDETAILS" PKGS REAL "$pkgdest" $PKGS | sed -n 's/ .*REAL.*$//p')"
+ done
+ PKGS="$REALPKGS"
ALLPKGS2=$(echo "$PKGS $ALLPKGS" | tr ' ' '\n' | sort | uniq)
PKGS=$(without "$ALLPKGS2" "$ALLPKGS")
ALLPKGS="$ALLPKGS2"