Changeset 539 in ProjectBuilder for devel/pb/lib/ProjectBuilder/CMS.pm
- Timestamp:
- Sep 15, 2008, 2:54:42 AM (16 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.