Frans, Joey: thanks for your beedback, and sorry for the latency - I
was travelling/offline quite a bit in the past week.

Here's an updated patch that implements Joey's suggestion of extending
mirror/udeb/suite to support multiple suites. Again I've omitted the
indention of the inner loop to make it clear what has changed.

What I don't like about it:
 * I'd prefer mirror/udeb/suites to mirror/udeb/suite, but I don't think
   its a good enough reason to break an interface that's already part of
   a stable release. One option would be to deprecate the singular
   version, but support it for one more release - in the meantime we
   could use one as an alias for the other, giving precedence to the
   plural version.
 * I don't like how nested things are getting; if this is accepted,
   I'd probably want to follow up with a patch that moves some of the
   inner code into its own function.
 * It doesn't solve the issue Frans highlighted about components
   coming from separate mirrors. A proper solution for that problem
   would probably involve letting users preseed with arbitrary sets of
   sources.list style entries, meaning components can be fetched from
   multiple types of media within one installation instance. That'd
   certainly be a better paradigm, but would require much more
   invasive changes.

Index: debian/changelog
===================================================================
--- debian/changelog    (revision 50009)
+++ debian/changelog    (working copy)
@@ -1,3 +1,12 @@
+net-retriever (1.19) UNRELEASED-unstable; urgency=low
+
+  * Let mirror/udeb/suite support multiple values. Components from each
+    of these suites will be accessible by anna. In the case that a package
+    is available from multiple places, anna's current behavior is to use
+    the last one, not necessarily the one with the greatest version.
+
+ -- dann frazier <[EMAIL PROTECTED]>  Fri, 02 Nov 2007 17:41:47 -0600
+
 net-retriever (1.18) unstable; urgency=low
 
   * Use /etc/udebs-source as the default release from which to fetch udebs.
Index: net-retriever
===================================================================
--- net-retriever       (revision 50009)
+++ net-retriever       (working copy)
@@ -96,7 +96,6 @@
        rm -f "$1"
        touch "$1"
 
-       # Setting codename to a suite is not very nice, but can do no harm
        if ! db_get mirror/udeb/suite || [ -z "$RET" ]; then
                if [ -f /etc/udebs-source ]; then
                        RET=$(cat /etc/udebs-source)
@@ -104,18 +103,19 @@
                        db_get mirror/codename
                fi
        fi
-       codename="$RET"
+       udebsuites="$RET"
 
        Release="/tmp/net-retriever-$$-Release"
-       fetch "dists/$codename/Release" "$Release" || exit $?
+       for suite in $udebsuites; do
+       fetch "dists/$suite/Release" "$Release" || exit $?
        # If gpgv and a keyring are installed, authentication is
        # mandatory by default.
        if type gpgv >/dev/null && [ -f "$keyring" ]; then
                if db_get debian-installer/allow_unauthenticated && [ "$RET" = 
true ]; then
                        log "Not verifying Release signature: unauthenticated 
mode enabled"
                else
-                       if ! fetch "dists/$codename/Release.gpg" 
"$Release.gpg"; then
-                               error "dists/$codename/Release is unsigned."
+                       if ! fetch "dists/$suite/Release.gpg" "$Release.gpg"; 
then
+                               error "dists/$suite/Release is unsigned."
                        fi
                        if ! log-output -t net-retriever --pass-stdout \
                             gpgv --status-fd 1 --keyring "$keyring" \
@@ -143,7 +143,7 @@
                        fi
                        Packages="/tmp/net-retriever-$$-Packages"
                        rm -f "$Packages"
-                       fetch "dists/$codename/$pkgfile" "$Packages" || continue
+                       fetch "dists/$suite/$pkgfile" "$Packages" || continue
                        checkmatch "$Release" "$pkgfile" \
                                "$(md5sum "$Packages" | cut -d' ' -f1)" \
                                "$(wc -c < "$Packages" | tr -d ' ')"
@@ -156,6 +156,8 @@
                        break
                done
        done
+       rm -f "$Release"
+       done
        exit $ret
        ;;
 




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to