Marc-Andre Lemburg <m...@egenix.com> added the comment: On 2009-03-18 18:13, Matthias Klose wrote: > Matthias Klose <d...@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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1322> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com