--- /usr/share/debootstrap/functions 2008-01-15 04:48:17.000000000 -0800 +++ ./functions 2009-05-19 19:29:56.951342404 -0700 @@ -1001,16 +1001,23 @@ # 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")" +# c="${COMPONENTS%% *}" 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') + for c in $COMPONENTS; do + local path="dists/$SUITE/$c/binary-$ARCH/Packages" + local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m1" "$path")" + local CPKGS="" + CPKGS=$("$PKGDETAILS" GETDEPS "$pkgdest" $PKGS) + CPKGS=$("$PKGDETAILS" PKGS REAL "$pkgdest" $CPKGS | sed -n 's/ .*REAL.*$//p') + if [ "$CPKGS" != "" ]; then + PKGS=$(echo "$CPKGS $PKGS" | tr ' ' '\n') + echo "$c:\n$PKGS">>/tmp.cpkgs + fi + done ALLPKGS2=$(echo "$PKGS $ALLPKGS" | tr ' ' '\n' | sort | uniq) PKGS=$(without "$ALLPKGS2" "$ALLPKGS") ALLPKGS="$ALLPKGS2"