Re: [PATCH] Add a personality to report 2.6.x version numbers

From: Colin Walters
Date: Tue Aug 23 2011 - 12:20:33 EST


On Tue, Aug 23, 2011 at 12:11 PM, Andi Kleen <ak@xxxxxxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/