Author zooko
Recipients benjamin.peterson, bgomes, christian.heimes, doko, draghuram, georg.brandl, lemburg, pavel.vinogradov, sapetnioc, zooko
Date 2009-03-18.17:36:03
SpamBayes Score 3.36187e-11
Marked as misclassified No
Message-id <1237397765.65.0.747739107874.issue1322@psf.upfronthosting.co.za>
In-reply-to
Content
doko: thanks for your interest encouraging more formal and generic
solutions to this.


For what it is worth, the current version of my patch (used in Tahoe) is
here:

http://allmydata.org/trac/tahoe/browser/src/allmydata/__init__.py?rev=20081125155118-92b7f-f74fc964ebd9d3c59afde68b6688c56ce20cca39#L31

I had to add a special case for Arch Linux, which gets triggered after
the three main cases.  The cases currently are, in order:

1.  Parse /etc/lsb-release (fast, semi-de-facto-standard, generic,
hopefully a future de-jure-standard).
2.  Invoke the Python Standard Library's platform.dist() (pros: fast,
has lots of customized special cases for different linux distros, cons:
has lots of customized special cases for different linux distros, gives
bogus answers for Ubuntu and Arch Linux)
3.  Subprocess execute "lsb_release" (pros: a real de-jure-standard!
cons: slow, and is not actually a de-facto-standard since many important
Linux installations don't come by default with the package that provides
the de-jure-standard "lsb_release" executable, even though they do come
by default with the de-facto-semi-standard "/etc/lsb-release" file).
4.  Arch Linux
History
Date User Action Args
2009-03-18 17:36:05zookosetrecipients: + zooko, lemburg, georg.brandl, doko, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes
2009-03-18 17:36:05zookosetmessageid: <1237397765.65.0.747739107874.issue1322@psf.upfronthosting.co.za>
2009-03-18 17:36:04zookolinkissue1322 messages
2009-03-18 17:36:03zookocreate