Item641: Displayed version of operating system may not be accurate
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release:
Applies To: Engine
Component: CGISetup.pm
Branches:
CGISetup.pm
refers to
$Config::Config{osvers}
in order to display the OS release number; however, this information is cached (it's taken from
Config.pm
which is
"created by configpm when Perl was build."). While
$Config::Config{osname}
and
$Config::Config{archname}
shouldn't change, Linux kernel updates aren't that uncommon. Therefore, the release should rather be determined from
POSIX::uname()
if that's available (NB according to
perldoc POSIX
,
"the actual meanings of the various fields are not that well standardized", so this shouldn't become a new default--maybe use some kind of conditional/whitelist here) . When using the aforementioned variable, we should add
"(cached)" or the like (at least under Linux).
You can compare the results as follows:
perl -MConfig -wle 'print $Config::Config{osvers}'
perl -MPOSIX -wle 'my ($sysname, $nodename, $release, $version, $machine) = POSIX::uname(); print $release;'
( Do we need a proposal for this? It's understood that this shouldn't delay our first release, but if it's considered a no-brainer, this could be fixed while looking into Tasks.Item617 )
--
MarkusUeberall
most Perl projects seem to use
$^O
and leave it at that. I've never quite groked why we cache it, especially as code that needs it should be removed over time as we learn to write real code
--
SvenDowideit - 08 Feb 2009
So Sven, is this confirmed? Or no action? Or what? Please set the status appropriately when you triage a report - leaving them in "New" state just passes the buck to someone else.
--
CrawfordCurrie - 08 Sep 2010
So far out of date and behind the code that it's not worth thinking about. No-action.
--
Main.CrawfordCurrie - 20 Jun 2015 - 08:19