Package: build-essential
Version: 11.5
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch natty

        Hi

 Please find a patch tweaking make-esslist.sh for various features
 notably helping Ubuntu support.

   Thanks for considering,
-- 
Loïc Minier
diff -Nru build-essential-11.5/debian/changelog 
build-essential-11.6/debian/changelog
--- build-essential-11.5/debian/changelog       2010-03-14 22:53:47.000000000 
+0100
+++ build-essential-11.6/debian/changelog       2010-11-13 17:10:21.000000000 
+0100
@@ -1,3 +1,20 @@
+build-essential (11.6) UNRELEASED; urgency=low
+
+  * Update make-esslist.sh to:
+    . sort packages to allow for cleaner diffs across updates and between
+      Debian and Ubuntu.
+    . default to `lsb_release -cs` for dist instead of sid, this is needed for
+      Ubuntu as the development dist changes name constantly and should work
+      under Debian too; an alternative would be the target dist from
+      debian/changelog, but this is often UNRELEASED.
+    . query a list of servers instead of only one; this is needed for the
+      archive.u.c / ports.u.c split in Ubuntu, but it's also helpful to
+      allow configuring a local mirror (which might not carry all
+      architectures).  The default list is http://ftp2.de.debian.org/debian
+      http://ftp.debian.org/debian.
+
+ -- Loïc Minier <[email protected]>  Sat, 13 Nov 2010 16:46:20 +0100
+
 build-essential (11.5) unstable; urgency=low
 
   * Bump dependencies on gcc and g++ to 4.4.3.
diff -Nru build-essential-11.5/make-esslist.sh 
build-essential-11.6/make-esslist.sh
--- build-essential-11.5/make-esslist.sh        2010-03-14 22:45:05.000000000 
+0100
+++ build-essential-11.6/make-esslist.sh        2010-11-13 17:03:25.000000000 
+0100
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-esslist=essential-packages-list
-mirror=http://ftp.debian.org/debian
-mirror=http://ftp2.de.debian.org/debian
-dist=sid
-
 set -e
 
+esslist=essential-packages-list
+mirror_list="http://ftp2.de.debian.org/debian http://ftp.debian.org/debian";
+#mirror_list="http://yourmirror/ubuntu http://yourmirror/ubuntu-ports 
$mirror_list"
+dist=`lsb_release -cs`
+
 arches=`awk '($1 != "" && $1 !~ /^#/) {print $2}' /usr/share/dpkg/archtable \
        | sort | uniq`
 
@@ -14,12 +14,15 @@
 do
        if [ ! -f Packages-$arch ]
        then
-               if wget -O Packages-$arch.bz2 
$mirror/dists/$dist/main/binary-$arch/Packages.bz2
-               then
-                       bunzip2 -f Packages-$arch.bz2
-               else
-                       rm -f Packages-$arch
-               fi
+               for mirror in $mirror_list; do
+                       if wget -O Packages-$arch.bz2 
$mirror/dists/$dist/main/binary-$arch/Packages.bz2
+                       then
+                               bunzip2 -f Packages-$arch.bz2
+                               break
+                       else
+                               rm -f Packages-$arch
+                       fi
+               done
        fi
        if [ -f Packages-$arch ]
        then
@@ -32,7 +35,7 @@
                echo >> $esslist-$arch
 
                grep-status -FEssential -sPackage -ni yes Packages-$arch \
-                       >> $esslist-$arch
+                       | sort >> $esslist-$arch
        else
                echo "No essential packages list is available" \
                        "for $arch in $dist" > $esslist-$arch

Reply via email to