Changeset 151
- Timestamp:
- 06/11/10 14:25:18 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/debbuild
r149 r151 131 131 "3.1" => "sarge", 132 132 "4" => "etch", 133 "4.0" => "lenny", 134 "4.0.0" => "sid"); 133 "5" => "lenny", 134 "5.0.0" => "squeeze", 135 "99" => "sid"); 135 136 # Enh. There doesn't seem to be any better way to do this... :( 136 137 { 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? 144 162 145 163 $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 148 167 149 168 # Package data … … 1441 1460 next if m|/lib(?:64)?/ld-linux|; # Hack! Hack! PTHBTT! (libc suxx0rz) 1442 1461 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! 1443 1463 1444 1464 my ($req) = (m|=\>\s+([a-z0-9._/-]+)|); # dig out the actual library (so)name.
Note:
See TracChangeset
for help on using the changeset viewer.