[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

BSDStats ( Was: Re: output of sys.platform changed )



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Is there any way of determining Debian GNU/kFreeBSD vs Gentoo GNU/kFreeBSD 
without using sysctl?  I know I can get GNU/kFreeBSD out of uname -o, but how 
can I get 'Debian'?

I'm trying to update the bsdstats (http://www.bsdstats.org) script to split 
between the two, else I have to lump it all in as "GNU/kFreeBSD", which is what 
we are doing now :(

Thanks ...

- --On Monday, January 22, 2007 16:22:53 +0530 Ritesh Raj Sarraf 
<rrs@researchut.com> wrote:

> Petr Salinger wrote:
>
>> Hi.
>>
>>> I have a python application which relies on the sys.platform output.
>>>
>>> I noticed that on GNU/kFreeBSD, the output of sys.paltform has changed from
>>> gnukfreebsd5 to gnukfreebsd6.
>>>
>>> Is this intentional ?
>>> How are the numbers calculated ?
>>
>> It is derived from version number of FreeBSD kernel.
>> It used to be 5.3, 5.4 ,6.0 ,6.1. Currently it is 6.2.
>>
>
> Yes, that is what came to my mind too. So, ideally for a FreeBSD 5.x kernel it
> should show gnukfreebsd5 and for a FreeBSD 6.x kernel it should show
> gnukfreebsd6.
>
> But on my system, where uname -a reports 5.4-1-486, the output from
> sys.platform is gnukfreebsd6.
> Which means the sys.platform output is being taken from somewhere else.
>
>> But I don't know why is part of version number included in sys.platform.
>>
> There might be a good reason behind that. Even for Linux systems the output of
> sys.platform is linux2. I think sys.platform is caring only about the major
> releases (though in linux major releases are 2.X)
>
> And even if that's the (correct) case, sys.platform should output gnukfreebsd5
> for a 5.x FreeBSD kernel installed.
>
>>> Is there something else I should check for to find out if the platform is a
>>> GNU/kFreeBSD box ?
>>
>> The best would be to test whether sys.platform starts with "gnukfreebsd",
>> as gnukfreebsd7 is not so far.
>>
>
> Yes, that'd be my last option. But for the point I mentioned above, I think
> there is a bug somewhere. Not sure if it's in the python package or any of the
> freebsd related packages.
>
> I also verified the installed FreeBSD kernel on my system and it says is
> kfreebsd-image-5.4-1-486 5.4-21. I don't see any FreeBSD 6.x series kernel
> image or utility installed on my box.
>
>
> Ritesh
> --
> Ritesh Raj Sarraf
> RESEARCHUT - http://www.researchut.com
> "Necessity is the mother of invention."
> "Stealing logic from one person is plagiarism, stealing from many is
> research." "The great are those who achieve the impossible, the petty are
> those who cannot - rrs"
>
>
> --
> To UNSUBSCRIBE, email to debian-bsd-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>



- ----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email . scrappy@hub.org                              MSN . scrappy@hub.org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFtMA64QvfyHIvDvMRAhgNAKCslCuVb1LuSlKVcbOr8JXIKW0lWQCfW8yw
mxPOSpUuoAUR/NIbIx4D9bQ=
=oHMT
-----END PGP SIGNATURE-----



Reply to: