~ubuntu-branches/ubuntu/karmic/system-tools-backends/karmic-proposed

« back to all changes in this revision

Viewing changes to Utils/Platform.pm

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2009-10-08 11:42:26 UTC
  • mfrom: (1.1.28 upstream) (1.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091008114226-zp9fxn7h4ky0qai0
Tags: 2.8.2-1
* New upstream release.
  - debian/patches/01_debian_4.0.patch,
  - debian/patches/04_correct_perl_command.patch:
    + Removed, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env perl
 
1
#!/usr/bin/perl
2
2
#-*- Mode: perl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3
3
 
4
4
# Determine the platform we're running on.
32
32
# --- System guessing --- #
33
33
 
34
34
my $PLATFORM_INFO = {
35
 
  "debian-3.0"      => [ "Debian GNU/Linux", "3.0", "Woody" ],
36
 
  "debian-3.1"      => [ "Debian GNU/Linux", "3.1", "Sarge" ],
37
 
  "ubuntu-5.04"     => [ "Ubuntu Linux", "5.04", "Hoary" ],
38
 
  "ubuntu-5.10"     => [ "Ubuntu Linux", "5.10", "Breezy" ],
39
 
  "ubuntu-6.06"     => [ "Ubuntu Linux", "6.06", "Dapper" ],
40
 
  "ubuntu-6.10"     => [ "Ubuntu Linux", "6.10", "Edgy" ],
41
 
  "ubuntu-7.04"     => [ "Ubuntu Linux", "7.04", "Feisty" ],
42
 
  "ubuntu-7.10"     => [ "Ubuntu Linux", "7.10", "Gutsy" ],
43
 
  "ubuntu-8.04"     => [ "Ubuntu Linux", "8.04", "Hardy" ],
 
35
  "debian"          => [ "Debian GNU/Linux" ],
44
36
  "redhat-5.2"      => [ "Red Hat Linux", "5.2", "Apollo" ],
45
37
  "redhat-6.0"      => [ "Red Hat Linux", "6.0", "Hedwig" ],
46
38
  "redhat-6.1"      => [ "Red Hat Linux", "6.1", "Cartman" ],
116
108
    (
117
109
     "blackpanther-4.0" => "mandrake-9.0",
118
110
     "conectiva-10"     => "conectiva-9",
119
 
     "debian-3.1"       => "debian-3.0",
120
111
     "mandrake-7.1"     => "redhat-6.2",
121
112
     "mandrake-7.2"     => "redhat-6.2",
122
113
     "mandrake-9.1"     => "mandrake-9.0",
147
138
     "slackware-12.0.0" => "slackware-9.1.0",
148
139
     "bluewhite64-12.0.0" => "slackware-9.1.0",
149
140
     "suse-9.1"         => "suse-9.0",
150
 
     "ubuntu-5.04"      => "debian-3.0",
151
 
     "ubuntu-5.10"      => "debian-3.0",
152
 
     "ubuntu-6.06"      => "debian-3.0",
153
 
     "ubuntu-6.10"      => "debian-3.0",
154
 
     "ubuntu-7.10"      => "ubuntu-7.04",
155
 
     "ubuntu-8.04"      => "ubuntu-7.04",
156
141
     "vine-3.1"         => "vine-3.0",
157
142
     "vlos-1.2"         => "gentoo",
158
143
     "nexenta-1.0"      => "solaris-2.11",
159
 
     "guadalinex-v4"    => "debian-3.0",
160
144
     );
161
145
 
162
146
  return $metamap{$distro} if ($metamap{$distro});
366
350
 
367
351
  my %platform_checks = (
368
352
    "Linux"   => [[ \&check_lsb ],
369
 
                  [ \&check_distro_file, "/etc/debian_version", "debian", "(.*)", { "testing/unstable" => "sarge" } ],
 
353
                  [ \&check_file_exists, "/etc/debian_version", "debian" ],
370
354
                  [ \&check_distro_file, "/etc/SuSE-release", "suse", "VERSION\\s*=\\s*(\\S+)" ],
371
355
                  [ \&check_distro_file, "/etc/blackPanther-release", "blackpanther", "^Linux Black Panther release (\\S+)" ],
372
356
                  [ \&check_distro_file, "/etc/blackPanther-release", "blackpanther", "^Black Panther ( L|l)inux release ([\\d\\.]+)" ],