Changeset 539 in ProjectBuilder for devel/pb/lib
- Timestamp:
- Sep 15, 2008, 2:54:42 AM (17 years ago)
- Location:
- devel/pb/lib/ProjectBuilder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.