msg199345 - (view) |
Author: Alexander Boyd (javawizard) |
Date: 2013-10-09 21:14 |
Tested on 3.3.2 and 2.6.6. On Oracle Linux, platform.linux_distribution detects the current distribution as Red Hat Enterprise Linux: >>> import platform >>> platform.linux_distribution() ('Red Hat Enterprise Linux Server', '6.2', 'Santiago') I would have expected something along the lines of: >>> import platform >>> platform.linux_distribution() ('Oracle Linux', '6.2', '') Or perhaps ('Oracle Linux Server', '6.2', ''). |
|
|
msg199352 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2013-10-09 22:05 |
You might expect that, but platform.linux_distribution is basing its report on what is in /etc/xxx-version or xxx-release. Most likely this is an Oracle "bug", although they might be providing both their own version file and the version file for the RH release they are basing off of, in which case we could perhaps tweak the platform code to take that into account. Can you figure out which it is? |
|
|
msg200083 - (view) |
Author: Alexander Boyd (javawizard) |
Date: 2013-10-16 20:29 |
They're providing both /etc/oracle-release and /etc/redhat-release (as Oracle Linux is based on RHEL). I've attached /etc/oracle-release for reference. |
|
|
msg200087 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2013-10-16 20:54 |
Gah. Well, by good fortune 'o' comes before 'r' in the alphabet, so it should be enough to just add 'oracle' to the list of _supported_dists in platform.py. Can you test that and confirm it? |
|
|
msg200178 - (view) |
Author: Alexander Boyd (javawizard) |
Date: 2013-10-17 23:58 |
Yep, that fixes it. |
|
|
msg200180 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2013-10-18 01:12 |
Based on Marc-Andre recommendation at the end of issue 11678, I plan to commit this as a bug fix, and add arch to 2.7 while I'm at it. Unless there are objections. |
|
|
msg317688 - (view) |
Author: Petr Viktorin (petr.viktorin) *  |
Date: 2018-05-25 17:18 |
linux_distribution is removed in Python 3.7. Closing. |
|
|
msg317690 - (view) |
Author: Petr Viktorin (petr.viktorin) *  |
Date: 2018-05-25 17:20 |
Er, sorry, I meant in 3.8. |
|
|