Changeset 539 in ProjectBuilder
- Timestamp:
- Sep 15, 2008, 2:54:42 AM (16 years ago)
- Location:
- devel
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/Makefile.PL
r514 r539 5 5 # the contents of the Makefile that is written. 6 6 WriteMakefile( 7 NAME => 'P rojectBuilder',8 DISTNAME => ' perl-ProjectBuilder',7 NAME => 'PBPKG', 8 DISTNAME => 'PBPKG', 9 9 VERSION => 'PBVER', 10 10 INST_SCRIPT => 'blib/bin', -
devel/pb/bin/pb
r537 r539 483 483 pb_log(0,"Management of $pbpkg $pbver-$pbtag (rev $pbrev)\n"); 484 484 die "Unable to get env var PBDESTDIR" if (not defined $ENV{'PBDESTDIR'}); 485 485 486 # Clean up dest if necessary. The export will recreate it 486 487 my $dest = "$ENV{'PBDESTDIR'}/$pbpkg-$pbver"; … … 536 537 } 537 538 538 # Setup %pb structure to allow filtering later on on files using that structure539 # Setup %pb structure to allow filtering later on, on files using that structure 539 540 $pb{'tag'} = $pbtag; 540 541 $pb{'rev'} = $pbrev; 541 $pb{'pkg'} = $pbpkg;542 542 $pb{'ver'} = $pbver; 543 543 $pb{'date'} = $pbdate; … … 558 558 pb_log(2,"DEBUG: distro tuple: ".Dumper($ddir, $dver, $dfam, $pb{'dtype'}, $pb{'suf'})."\n"); 559 559 pb_log(2,"DEBUG Filtering PBDATE => $pbdate, PBTAG => $pbtag, PBVER => $pbver\n"); 560 561 # We need to compute the real name of the package 562 my $pbpkgreal = pb_cms_get_real_pkg($pbpkg,$pb{'dtype'}); 563 $pb{'pkg'} = $pbpkgreal; 560 564 561 565 # Filter build files from the less precise up to the most with overloading … … 703 707 pb_log(2,"DEBUG pkgs: ".Dumper(%pkgs)."\n"); 704 708 open(PKG,"> $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb") || die "Unable to create $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb"; 705 foreach my $pbpkg ( @pkgs) {709 foreach my $pbpkg (keys %pkgs) { 706 710 print PKG "pbpkg $pbpkg = $pkgs{$pbpkg}\n"; 707 711 } -
devel/pb/lib/ProjectBuilder/CMS.pm
r537 r539 30 30 31 31 our @ISA = qw(Exporter); 32 our @EXPORT = qw(pb_cms_init pb_cms_export pb_cms_get_uri pb_cms_copy pb_cms_checkout pb_cms_up pb_cms_checkin pb_cms_isdiff pb_cms_get_pkg pb_cms_ compliant pb_cms_log pb_cms_add);32 our @EXPORT = qw(pb_cms_init pb_cms_export pb_cms_get_uri pb_cms_copy pb_cms_checkout pb_cms_up pb_cms_checkin pb_cms_isdiff pb_cms_get_pkg pb_cms_get_real_pkg pb_cms_compliant pb_cms_log pb_cms_add); 33 33 34 34 =pod … … 449 449 } 450 450 451 =item B<pb_cms_get pkg>451 =item B<pb_cms_get_pkg> 452 452 453 453 This function returns the list of packages we are working on in a CMS action. … … 474 474 pb_log(0,"Packages: ".join(',',@pkgs)."\n"); 475 475 return(\@pkgs); 476 } 477 478 =item B<pb_cms_get_real_pkg> 479 480 This function returns the real name of a virtual package we are working on in a CMS action. 481 It supports the following types: perl. 482 The first parameter is the virtual package name 483 484 =cut 485 486 sub pb_cms_get_real_pkg { 487 488 my $pbpkg = shift || undef; 489 my $dtype = shift; 490 my $pbpkgreal = $pbpkg; 491 492 my @nametype = pb_conf_get_if("namingtype"); 493 my $type = $nametype[0]->{$pbpkg}; 494 if (defined $type) { 495 if ($type eq "perl") { 496 if ($dtype eq "rpm") { 497 $pbpkgreal = "perl-".$pbpkg; 498 } elsif ($dtype eq "deb") { 499 $pbpkgreal = "lib".lc($pbpkg)."-perl"; 500 } elsif ($dtype eq "ebuild") { 501 $pbpkgreal = $pbpkg; 502 } else { 503 die "pb_cms_get_real_pkg not implemented for $dtype yet"; 504 } 505 } else { 506 die "nametype $type not implemented yet"; 507 } 508 } 509 510 pb_log(2,"Real Package: $pbpkgreal\n"); 511 return($pbpkgreal); 476 512 } 477 513 -
devel/pb/lib/ProjectBuilder/Env.pm
r505 r539 118 118 # Detect the root dir for hosting all the content generated with pb 119 119 # 120 # Tree will look like this: 121 # 122 # maint pbdefdir PBDEFDIR dev dir (optional) 123 # | | 124 # ------------------------ -------------------- 125 # | | | | 126 # pbproj1 pbproj2 PBPROJ pbproj1 pbproj2 PBPROJDIR 127 # | | 128 # --------------------------------------------- ---------- 129 # * * * | | | * * 130 # tag dev pbconf ... build delivery PBCONFDIR dev tag 131 # | | | PBDESTDIR | 132 # --- ------ pbrc PBBUILDDIR ------- 133 # | | | | | 134 # 1.1 dev tag 1.0 1.1 PBDIR 135 # | 136 # ------- 137 # | | 138 # 1.0 1.1 PBROOTDIR 139 # | 140 # ---------------------------------- 141 # | | | | 142 # pkg1 pbproj1.pb pbfilter pbcl 143 # | 144 # ----------------- 145 # | | | 146 # rpm deb pbfilter 147 # 148 # 149 # (*) By default, if no relocation in .pbrc, dev dir is taken in the maint pbdefdir (when appropriate) 150 # Names under a pbproj and the corresponding pbconf should be similar 151 # 120 =over 4 121 122 Tree will look like this: 123 124 maint pbdefdir PBDEFDIR dev dir (optional) 125 | | 126 ------------------------ -------------------- 127 | | | | 128 pbproj1 pbproj2 PBPROJ pbproj1 pbproj2 PBPROJDIR 129 | | 130 --------------------------------------------- ---------- 131 * * * | | | * * 132 tag dev pbconf ... build delivery PBCONFDIR dev tag 133 | | | PBDESTDIR | 134 --- ------ pbrc PBBUILDDIR ------- 135 | | | | | 136 1.1 dev tag 1.0 1.1 PBDIR 137 | 138 ------- 139 | | 140 1.0 1.1 PBROOTDIR 141 | 142 ---------------------------------- 143 | | | | 144 pkg1 pbproj1.pb pbfilter pbcl 145 | 146 ----------------- 147 | | | 148 rpm deb pbfilter 149 150 151 (*) By default, if no relocation in .pbrc, dev dir is taken in the maint pbdefdir (when appropriate) 152 Names under a pbproj and the corresponding pbconf should be similar 153 154 =cut 152 155 153 156 my ($pbdefdir) = pb_conf_get_if("pbdefdir"); … … 217 220 218 221 # 219 # The following part is only useful when in cms2something o f newver222 # The following part is only useful when in cms2something or newsomething 220 223 # In VMs/VEs we want to skip that by providing good env vars. 221 224 # return values in that case are useless
Note:
See TracChangeset
for help on using the changeset viewer.