You are here: Foswiki>Tasks Web>Item641 (20 Jun 2015, CrawfordCurrie)Edit Attach

Item641: Displayed version of operating system may not be accurate

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release:
Applies To: Engine
Component: CGISetup.pm
Branches:
Reported By: Foswiki:Main.MarkusUeberall
Waiting For:
Last Change By: CrawfordCurrie
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 smile )

-- 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 smile

-- 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

ItemTemplate edit

Summary Displayed version of operating system may not be accurate
ReportedBy Foswiki:Main.MarkusUeberall
Codebase 1.0.0 beta3, trunk
SVN Range TWiki-4.2.3, Wed, 06 Aug 2008, build 17396
AppliesTo Engine
Component CGISetup.pm
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r5 - 20 Jun 2015, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy