Changeset 151


Ignore:
Timestamp:
06/11/10 14:25:18 (14 years ago)
Author:
kdeugau
Message:

/trunk

Update Debian release version mappings
Tweak the Debian version autodetection
Add another kernel-innards "library" to the list to ignore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r149 r151  
    131131        "3.1"   => "sarge",
    132132        "4"     => "etch",
    133         "4.0"   => "lenny",
    134         "4.0.0" => "sid");
     133        "5"     => "lenny",
     134        "5.0.0" => "squeeze",
     135        "99"    => "sid");
    135136# Enh.  There doesn't seem to be any better way to do this...  :(
    136137{
    137   my $basever = qx { dpkg-query --showformat '\${version}' -W base-files };
    138   if ($basever =~ /^\d\.\d\.(\d)$/) {
    139     $basever =~ s/\.\d$// if $1 ne '0';
    140   }
    141 # want to do something with this...   erm, what was I going to do?  O_o
    142   my $releasever = qx { cat /etc/debian_version };
    143   chomp $releasever;
     138# could theoretically also do something with this...  it's about as stable as "dpkg-query ..." below...  :(
     139#  my $releasever = qx { cat /etc/debian_version };
     140#  chomp $releasever;
     141  my $basever;
     142
     143  if ( ! -e '/usr/bin/dpkg-query' ) {
     144    # call it woody, since sarge and newer have dpkg-query, and we don't much care about obsolete^n releases
     145    $basever = "3.0";
     146  } else {
     147
     148    # for the lazy copy-paster:  dpkg-query --showformat '${version}\n' -W base-files
     149    # avoid shellisms
     150    if (open BASEGETTER, "-|", "dpkg-query", "--showformat", '${version}', "-W", "base-files") {
     151      $basever = <BASEGETTER>;
     152      close BASEGETTER;
     153
     154      if ($basever =~ /^\d\.\d\.\d$/) {
     155        # sarge, possibly squeeze O_o  (5.0.0 as of 2010/02/03)
     156        $basever =~ s/\.\d$//;
     157      }
     158      $basever = 5 if ($basever =~ /lenny/);
     159    }
     160
     161  } # got dpkg-query?
    144162
    145163  $specglobals{"debdist"} = $distmap{$basever};
    146   $specglobals{"debver"} = $basever;    # this may have trouble with Ubuntu versions?
    147 }
     164  $specglobals{"debver"} = $basever;   # this may have trouble with Ubuntu versions?
     165
     166} # done trying to set debian dist/version
    148167
    149168# Package data
     
    14411460    next if m|/lib(?:64)?/ld-linux|;    # Hack! Hack!  PTHBTT!  (libc suxx0rz)
    14421461    next if /linux-gate.so/;            # Kernel hackery for teh W1n!!1!1eleventy-one!1  (Don't ask.  Feh.)
     1462    next if /linux-vdso.so/;            # More kernel hackery.  Whee!
    14431463
    14441464    my ($req) = (m|=\>\s+([a-z0-9._/-]+)|); # dig out the actual library (so)name.
Note: See TracChangeset for help on using the changeset viewer.