This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients benjamin.peterson, bgomes, christian.heimes, doko, draghuram, georg.brandl, lemburg, pavel.vinogradov, sapetnioc, zooko
Date 2009-03-20.12:42:47
SpamBayes Score 8.1956664e-13
Marked as misclassified No
Message-id <49C38F45.6010008@egenix.com>
In-reply-to <1237396411.15.0.309007084271.issue1322@psf.upfronthosting.co.za>
Content
On 2009-03-18 18:13, Matthias Klose wrote:
> Matthias Klose <doko@debian.org> added the comment:
> 
> MAL, please can we add zooko's patch in some form? The current
> implementation assumes an implementation, which doesn't exist on all
> platforms, and just dividing linux distributions in "unsupported" and
> "supported" seems to be odd.

I've already mentioned what needs to be done to make Zooko's patch
suitable for platform.py (see further up on this ticket discussion).

The patch still doesn't meet those requirement, so cannot be applied.

Furthermore, I would prefer that piping to lsb_release only be used
as fallback solution. This should not be the default mechanism.

Regarding the problems on Ubuntu: That's mainly due to the way Ubuntu
decided to use the LSB standard. Most other Linux platforms work
just fine with the existing platform.py parser.

In order to support Ubuntu as well, we'll have to parse the
DISTRIB_* "variables" in /etc/lsb-release.

> You cite some URL's in platform.py:
> 
>  - http://linuxmafia.com/faq/Admin/release-files.html
>  
>    "Linux System Base-compliant systems should have a file called
>    /etc/lsb_release, which may be in addition to a distribution-
>    specific file."
> 
>    The standard doesn't say anything like this.
> 
>  - http://linux.die.net/man/1/lsb_release
>    This is one implementation, not more. The current platform.py
>    implementation seems to require this particular implementation.
> 
> The only relevant URL is missing in this file:
> http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/lsbrelease.html

Thanks, I'll add that. Note that the link doesn't mention anything
about the file format of the /etc/lsb_release file or how it should
be parsed. That's why I added the other URLs.

BTW: Here's what "man lsb_release" says on OpenSUSE:

"""
       If the installation is LSB  compliant,  the  "/etc/lsb-release"  file
should  contain  the
       LSB_VERSION  field.   The  value of the field should be a colon separated
list of supported
       module versions indicating the LSB specification modules to which the
installation is  com‐
       pliant. If the installation is not compliant, the above field should not
be present.

       Optional  fields are DISTRIB_ID, DISTRIB_RELEASE, DISTRIB_CODENAME,
DISTRIB_DESCRIPTION and
       can be used to override information which is parsed from the
"/etc/distrib-release" file.

       If the "/etc/lsb-release.d" directory exists, it is searched for
filenames which are  taken
       as additional module-version strings to add to LSB_VERSION.

       The "/etc/distrib-release" file contains a description line which is
parsed to get informa‐
       tion (especially on currently non-LSB compliant systems).
"""

It is interesting to note that Ubuntu's /etc/lsb_release file does not
contain the LSB_VERSION field. That would suggest, that Ubuntu is not
LSB compliant.
History
Date User Action Args
2009-03-20 12:42:54lemburgsetrecipients: + lemburg, georg.brandl, doko, zooko, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes
2009-03-20 12:42:52lemburglinkissue1322 messages
2009-03-20 12:42:47lemburgcreate