[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: r29764 - in trunk/packages/choose-mirror: . debian



On Mon, Aug 08, 2005 at 01:42:06AM -0400, Joey Hess wrote:
> Colin Watson wrote:
> > Author: cjwatson
> > Date: Sun Aug  7 19:40:44 2005
> > New Revision: 29764
> > 
> > Modified:
> >    trunk/packages/choose-mirror/choose-mirror.c
> >    trunk/packages/choose-mirror/debian/changelog
> >    trunk/packages/choose-mirror/debian/postinst
> > Log:
> > * Read DISTRIB_RELEASE from /etc/lsb-release if it's present, and use that
> >   to override the hardcoded PREFERRED_DISTRIBUTION.
> 
> DISTRIB_RELEASE is set to "3.1 (installer build $(BUILD_DATE))" in d-i,
> so won't this make choose-mirror try to download a nonexistant Release
> file and die?

Oh, bah, I meant DISTRIB_CODENAME. Sorry, fixing.

> I don't follow the reasoning that connects DISTRIB_RELEASE with
> PREFERRED_DISTRIBUTION either. DISTRIB_RELEASE has a specific format and
> contents required by lsb stuff, while PREFERRED_DISTRIBUTION is whatever
> debian distribution name we need to set it to today to make d-i work
> well.

Debian-derived distributions that do code modifications are (I think)
always going to set DISTRIB_CODENAME to a valid suite name if they
modify lsb-release. It's an obvious single place to look to get the
current suite name. In Ubuntu I added an lsb-release-udeb so that we
could get at it from d-i easily, but setting it at initrd build time
works just as well; the general idea was to save derivatives from having
to rebuild choose-mirror just to fiddle with PREFERRED_DISTRIBUTION.

> Now, we could add an internal-use debconf question instead of the
> hardcoded PREFERRED_DISTRIBUTION string or something like that..

That's slightly better than the hardcoded string certainly, but I think
using DISTRIB_CODENAME makes sense and is less work for people building
derivatives (because it's the same amount of initrd modification to
fiddle /etc/lsb-release versus adding a preseed, and the former can deal
with all default-suite-related things at once).

-- 
Colin Watson                                       [cjwatson@debian.org]



Reply to: