Bug#262080: Distribution detection still doesn't work

Raph Raph <raph@captainblood.org>, 262080@bugs.debian.org
Wed, 01 Sep 2004 22:53:33 +0200


--=-vDywsTmW0PBSNI0oSx1r
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hello,

The first distribution check which is run is check_lsb. It returns
"debian-3.1". Problem is, all scripts wait for "debian-sarge", whereas
other versions are expected as "debian-2.2" and "debian-3.0".

The "check_debian" subroutine works well, but check_lsb is ran first.

This breaks the detection of the distro : all applets expect
"debian-sarge" to recognize the distro, not (yet) "debian-3.1".

A previous check to transform "3.0" to "woody" was commented out. I
uncommented these 3 lines and changed the only key/value pair to "3.1"
and "sarge". This makes the check_lsb subroutine return "debian-sarge"
instead of "debian-3.1", as expected by all applets, which are working
again (they don't ask for the distro anymore).

A patch is attached.

Thanks for reading.

-- 
Raph <raph@captainblood.org>

--=-vDywsTmW0PBSNI0oSx1r
Content-Disposition: attachment; filename=patch
Content-Type: text/plain; name=patch; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

--- platform.pl.orig	2004-09-01 22:48:11.000000000 +0200
+++ platform.pl	2004-09-01 22:48:27.000000000 +0200
@@ -83,8 +83,8 @@
 sub check_lsb
 {
   my ($ver, $dist);
-#  my %vermap =
-#      ("3.0" => "woody");
+  my %vermap =
+      ("3.1" => "sarge");
   
   my %distmap =
       ("Debian" => "debian"),
@@ -96,7 +96,7 @@
   $dist = lc (&gst_parse_sh ("/etc/lsb-release", "DISTRIB_ID"));
   $ver = lc (&gst_parse_sh ("/etc/lsb-release", "DISTRIB_RELEASE"));
   
-#  $ver = $vermap{$ver} if exists $vermap{$ver};
+  $ver = $vermap{$ver} if exists $vermap{$ver};
   $dist = $distmap{$dist} if exists $dirmap{$dir};
 
   return -1 if ($dist eq "") || ($ver eq "");

--=-vDywsTmW0PBSNI0oSx1r--