Message73662
On 2008-09-23 21:49, Zooko O'Whielacronx wrote:
> Zooko O'Whielacronx <zooko@zooko.com> added the comment:
>
> MAL: why do you say it is better to look for
> /etc/$supportedplatform-release files first instead of looking for
> /etc/lsb-release first?
Because that's exactly what lsb_release does as well. The data
in /etc/lsb-release can only override data already parsed from
the /etc/<distro>-release file.
> I do not know if /etc/lsb-release is suitably generic -- I've tried it
> only on a few platforms. I do know that executing lsb_release is
> suitably generic since it is standard, but I prefer not to try it first
> since it imposes about half-a-second delay.
lsb_release is standard on LSB compliant Linuxes, but the much
older /etc/<distro>-release file approach is still valid and in
wide use.
E.g. on SuSE, /etc/lsb-release doesn't contain any usable
distribution information. On Fedora, that file doesn't exist at
all.
It's better to follow the approach taken by lsb_release and then
add calling lsb_release as one of the methods taken by
_dist_try_harder() (using platform.popen()) should the parsers
fail.
This avoids spawning a process in most cases. |
|
Date |
User |
Action |
Args |
2008-09-23 20:05:24 | lemburg | set | recipients:
+ lemburg, georg.brandl, zooko, draghuram, christian.heimes, sapetnioc, benjamin.peterson, pavel.vinogradov, bgomes |
2008-09-23 20:05:23 | lemburg | link | issue1322 messages |
2008-09-23 20:05:22 | lemburg | create | |
|