Changeset 423 in ProjectBuilder for devel/pb-modules/lib
- Timestamp:
- May 3, 2008, 1:03:24 AM (16 years ago)
- Location:
- devel/pb-modules/lib/ProjectBuilder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r405 r423 216 216 $debug = shift || 0; 217 217 $LOG = shift || \*STDOUT; 218 pb_log(1,"Debug value: $debug\n"); 218 219 219 220 } -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r402 r423 9 9 10 10 use strict; 11 use Data::Dumper; 11 12 use ProjectBuilder::Base; 12 13 … … 221 222 'suse' => ['suse', 'sles', 'opensuse'], 222 223 'redhat' => ['redhat', 'rhel', 'centos', 'mandrake', 'vmware'], 223 'lsb' => ['ubuntu', ' debian', 'lsb'],224 'lsb' => ['ubuntu', 'lsb'], 224 225 ); 225 226 … … 241 242 'opensuse' => 'openSUSE (\d.+) \(', 242 243 'lsb' => '.*[^Ubunt].*\nDISTRIB_RELEASE=(.+)', 243 # Ubuntu 6.06 includes a /etc/debian_version file that needs to be 244 # renamed to /etc/debian_version.sav as there is no way to distinguish 245 # Ubuntu 6.06 from debian testing otherwise 246 # Same is true for Ubuntu 7.10 :-( 244 # Ubuntu includes a /etc/debian_version file that cretaes an ambiguity with debian 245 # So we need to look at distros in reverse alphabetic order to treat ubuntu always first 247 246 'ubuntu' => '.*Ubuntu.*\nDISTRIB_RELEASE=(.+)', 248 247 'debian' => '(.+)', … … 274 273 } 275 274 276 while (($d,$r) = each %ambiguous_rel_files) { 277 if (-f "$base/$r" && !-l "$base/$r"){ 275 # Now look at ambiguous files 276 # Ubuntu includes a /etc/debian_version file that creates an ambiguity with debian 277 # So we need to look at distros in reverse alphabetic order to treat ubuntu always first via lsb 278 foreach $d (reverse keys %ambiguous_rel_files) { 279 $r = $ambiguous_rel_files{$d}; 280 if (-f "$base/$r" && !-l "$base/$r") { 278 281 # Found one possibility. 279 282 # Get all distros concerned by that file … … 281 284 my $found = 0; 282 285 my $ptr = $distro_similar{$d}; 283 #pb_log(2,$LOG "amb: ".Dumper($ptr)."\n" if ($debug >= 1);286 pb_log(2,"amb: ".Dumper($ptr)."\n"); 284 287 $release = "unknown"; 285 288 foreach my $dd (@$ptr) { 286 #pb_log(2,$LOG "check $dd\n" if ($debug >= 1);289 pb_log(2,"check $dd\n"); 287 290 # Try to check pattern 288 291 if (defined $distro_match{$dd}) { 289 #pb_log(2,$LOG "cmp: $distro_match{$dd} - vs - $tmp\n" if ($debug >= 1);292 pb_log(2,"cmp: $distro_match{$dd} - vs - $tmp\n"); 290 293 ($release) = $tmp =~ m/$distro_match{$dd}/m; 291 294 if ((defined $release) && ($release ne "unknown")) {
Note:
See TracChangeset
for help on using the changeset viewer.