diff options
author | Colin Watson <cjwatson@debian.org> | 2011-04-13 18:42:02 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2011-04-13 18:42:02 +0100 |
commit | 8ca6fafd9030acfc060bb9f6f83b96cb56b4a9fe (patch) | |
tree | 5b82d0813fd820e84bbe898d0821d39da1713954 /functions | |
parent | 92cf330c441260fa28f6277dc63823f6416e2115 (diff) | |
download | debootstrap-8ca6fafd9030acfc060bb9f6f83b96cb56b4a9fe.tar.gz |
Resolve dependencies from all requested components (LP: #740167).
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -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" |