lkml.org 
[lkml]   [2011]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Add a personality to report 2.6.x version numbers
From
On Tue, Aug 23, 2011 at 12:11 PM, Andi Kleen <ak@linux.intel.com> wrote:
>
> That's a good point. I googled for this pattern in google codesearch
> and there are 10+ in the first two pages.
>
> http://www.google.com/codesearch#search/&q=lang:^python$%20sys.platform%20linux2&p=1&type=cs

Yes, though I should note I wasn't trying to defend having a
compatibility sysctl or whatever - I think it's clear these apps are
broken. The python docs explicitly say that the returned string is
just a straightforward transformation of uname, and if the apps read
that carefully they'd realize they only want the first part.

The reportlab example will break for FreeBSD 5 too:

elif sys.platform in ("freebsd4", "darwin", "mac", "linux2"):

I just happen to watch Mozilla bugzilla so I saw that one go by and
wanted to provide data for the discussion.


\
 
 \ /
  Last update: 2011-08-23 18:23    [W:0.145 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site