Changeset 423 in ProjectBuilder
- Timestamp:
- May 3, 2008, 1:03:24 AM (17 years ago)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/bin/pbdistrocheck
r402 r423 9 9 10 10 use strict 'vars'; 11 use Getopt::Long qw(:config auto_abbrev no_ignore_case); 11 12 use Data::Dumper; 12 13 use lib qw (lib); 13 use ProjectBuilder::Distribution qw (pb_distro_init); 14 use ProjectBuilder::Distribution; 15 use ProjectBuilder::Base; 16 17 my %opts; # CLI Options 18 19 GetOptions("verbose|v+" => \$opts{'v'}); 20 if (defined $opts{'v'}) { 21 $debug = $opts{'v'}; 22 } 23 if (defined $opts{'l'}) { 24 open(LOG,"> $opts{'l'}") || die "Unable to log to $opts{'l'}: $!"; 25 $LOG = \*LOG; 26 $debug = 0 if ($debug == -1); 27 } 28 pb_log_init($debug, $LOG); 14 29 15 30 my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init(); -
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")) { -
devel/pb/bin/pb
r419 r423 331 331 if (defined $opts{'v'}) { 332 332 $debug = $opts{'v'}; 333 pb_log(0,"Debug value: $debug\n");334 333 } 335 334 if (defined $opts{'f'}) { -
projects/mondorescue/pbconf/branches/2.2.6/mondorescue.pb
r387 r423 28 28 # a QEMU rhel_3 here means that the VM will be named rhel_3.qemu 29 29 # 30 vmlist mondorescue = mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,fedora-7-i386,fedora-8-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,suse-10.3-i386,sles-9-i386,sles-10-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386, mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,fedora-6-x86_64,fedora-7-x86_64,fedora-8-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,suse-10.3-x86_64,sles-10-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_6430 vmlist mondorescue = mandrake-10.1-i386,mandrake-10.2-i386,mandriva-2006.0-i386,mandriva-2007.0-i386,mandriva-2007.1-i386,mandriva-2008.0-i386,redhat-7.3-i386,redhat-9-i386,fedora-4-i386,fedora-5-i386,fedora-6-i386,fedora-7-i386,fedora-8-i386,rhel-3-i386,rhel-4-i386,rhel-5-i386,suse-10.0-i386,suse-10.1-i386,suse-10.2-i386,suse-10.3-i386,sles-9-i386,sles-10-i386,gentoo-nover-i386,debian-3.1-i386,debian-4.0-i386,ubuntu-6.06-i386,ubuntu-7.04-i386,ubuntu-7.10-i386,ubuntu-8.04-i386,mandriva-2007.0-x86_64,mandriva-2007.1-x86_64,mandriva-2008.0-x86_64,fedora-6-x86_64,fedora-7-x86_64,fedora-8-x86_64,rhel-4-x86_64,rhel-5-x86_64,suse-10.2-x86_64,suse-10.3-x86_64,sles-10-x86_64,gentoo-nover-x86_64,debian-4.0-x86_64,ubuntu-7.04-x86_64,ubuntu-7.10-x86_64 31 31 32 32 #
Note:
See TracChangeset
for help on using the changeset viewer.