RFC: Depending on lsb-release for default dist and mirror

Loïc Minier lool at dooz.org
Sat Dec 12 10:49:25 UTC 2009


        Hey

 I'd like to change the way pbuilder works with respect to dist
 selection and would like to add some dependency on lsb-release for
 this, either Depends or Recommends.

 Currently, the default is always sid, can be overriden in pbuilderrc or
 on command-line.

 I'd like to change the default to whatever is currently being run, e.g.
 sid when running sid, squeeze when running squeeze and <current dist>
 when running on a Debian derivative, for instance Ubuntu.  I think
 pbuilder is used in a lot of derivatives (not just Ubuntu) to build
 packages for this distro rather than for Debian.

 The change could be as simple as:
 if [ -z "$DISTRIBUTION" ]; then
-    DISTRIBUTION=sid
+    if which lsb_release; then
+        DISTRIBUTION="`lsb_release -cs`"
+    else
+        DISTRIBUTION=sid
+    fi
 fi

 but there are a couple more places which needs some fiddling, notably
 the default mirror selection.  Also, this would mean some dep on
 lsb-release; I'd personally prefer a Depends:, but we could make it
 work as a Recommends: instead.  lsb-release is a bit slow to run the
 first time under Debian as it runs apt-cache, but I think that's ok.

 Would like to hear the comments of other maintainers,

  Thanks,
-- 
Loïc Minier



More information about the Pbuilder-maint mailing list