Final update-modules before the release

This commit is contained in:
Brian Fraser
2012-09-20 10:58:15 -03:00
parent 787718121f
commit 718bbedd4b
26 changed files with 325 additions and 154 deletions

View File

@@ -3393,12 +3393,13 @@ sub valid_item {
sub get_os_version {
my ($self) = @_;
if ( $OSNAME eq 'MSWin32' ) {
require Win32;
return Win32::GetOSDisplayName();
}
chomp(my $platform = `uname -s`);
PTDEBUG && _d('platform:', $platform);
if ( !$platform ) {
return $OSNAME if $OSNAME ne 'MSWin32';
return Win32::GetOSDisplayName();
}
return $OSNAME unless $platform;
chomp(my $lsb_release
@@ -3445,7 +3446,7 @@ sub get_os_version {
}
}
}
elsif ( $platform =~ m/^(BSD|Darwin)$/ ) {
elsif ( $platform =~ m/(?:BSD|^Darwin)$/ ) {
my $rel = `uname -r`;
$release = "$platform $rel";
}
@@ -3460,6 +3461,8 @@ sub get_os_version {
}
chomp($release);
$release =~ s/^"|"$//g;
PTDEBUG && _d('OS version =', $release);
return $release;
}
@@ -4295,7 +4298,7 @@ sub update_checks_file {
sub _touch {
my ($file) = @_;
sysopen my $fh, $file, O_WRONLY|O_CREAT|O_NONBLOCK
sysopen my $fh, $file, O_WRONLY|O_CREAT
or die "Cannot create $file : $!";
close $fh or die "Cannot close $file : $!";
utime(undef, undef, $file);