- Timestamp:
- Aug 30, 2017, 5:07:39 PM (7 years ago)
- Location:
- devel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Env.pm
r2257 r2258 235 235 * * * | | | * * 236 236 tag dev pbconf ... pbbuild pbdelivery PBCONFDIR dev tag 237 | | |PBDESTDIR |238 --- ------ pbrcPBBUILDDIR -------237 | | | PBDESTDIR | 238 --- ------ pbrc.yml PBBUILDDIR ------- 239 239 | | | | | 240 240 1.1 dev tag 1.0 1.1 PBDIR … … 246 246 ---------------------------------- 247 247 | | | | 248 pkg1 pbproj1. pbpbfilter pbcl248 pkg1 pbproj1.yml pbfilter pbcl 249 249 | 250 250 ----------------- … … 362 362 # 363 363 if (not defined $ENV{'PBROOTDIR'}) { 364 if (! -f ("$ENV{'PBDESTDIR'}/pbrc ")) {364 if (! -f ("$ENV{'PBDESTDIR'}/pbrc.yml")) { 365 365 $ENV{'PBROOTDIR'} = "$ENV{'PBCONFDIR'}"; 366 366 pb_log(1,"WARNING: no pbroot defined, using $ENV{'PBROOTDIR'}\n"); … … 368 368 die "No directory found under $ENV{'PBCONFDIR'}" if (not defined $ENV{'PBROOTDIR'}); 369 369 } else { 370 my ($pbroot) = pb_conf_read_if("$ENV{'PBDESTDIR'}/pbrc ","pbroot");370 my ($pbroot) = pb_conf_read_if("$ENV{'PBDESTDIR'}/pbrc.yml","pbroot"); 371 371 # That's always the environment variable that will be used 372 die "Please remove inconsistent $ENV{'PBDESTDIR'}/pbrc " if ((not defined $pbroot) || (not defined $pbroot->{$ENV{'PBPROJ'}}));372 die "Please remove inconsistent $ENV{'PBDESTDIR'}/pbrc.yml" if ((not defined $pbroot) || (not defined $pbroot->{$ENV{'PBPROJ'}})); 373 373 $ENV{'PBROOTDIR'} = $pbroot->{$ENV{'PBPROJ'}}; 374 374 } … … 384 384 385 385 # Adds that conf file to the list to consider 386 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb") if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb");386 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") if (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml"); 387 387 388 388 return if ($action =~ /^(newver|getconf|setupve)$/); … … 394 394 my %supfiles = (); 395 395 396 if ((-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb") and (not defined $pbinit)) {396 if ((-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") and (not defined $pbinit)) { 397 397 398 398 # List of pkg to build by default (mandatory) … … 422 422 $ENV{'PBPROJVER'}=$pkgv->{$ENV{'PBPROJ'}}; 423 423 } else { 424 die "No projver found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb";424 die "No projver found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml"; 425 425 } 426 426 } 427 die "Invalid version name $ENV{'PBPROJVER'} in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb" if (($ENV{'PBPROJVER'} !~ /[0-9.]+/) && (defined $version) && ($ENV{'PBPROJVER'} =~ /$version{$ENV{'PBPROJ'}}/));427 die "Invalid version name $ENV{'PBPROJVER'} in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml" if (($ENV{'PBPROJVER'} !~ /[0-9.]+/) && (defined $version) && ($ENV{'PBPROJVER'} =~ /$version{$ENV{'PBPROJ'}}/)); 428 428 429 429 if (not defined $ENV{'PBPROJTAG'}) { … … 431 431 $ENV{'PBPROJTAG'}=$pkgt->{$ENV{'PBPROJ'}}; 432 432 } else { 433 die "No projtag found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb";433 die "No projtag found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml"; 434 434 } 435 435 } 436 die "Invalid tag name $ENV{'PBPROJTAG'} in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb" if ($ENV{'PBPROJTAG'} !~ /[0-9.]+/);436 die "Invalid tag name $ENV{'PBPROJTAG'} in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml" if ($ENV{'PBPROJTAG'} !~ /[0-9.]+/); 437 437 438 438 … … 441 441 $ENV{'PBPACKAGER'}=$pbpackager->{$ENV{'PBPROJ'}}; 442 442 } else { 443 die "No pbpackager found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb";443 die "No pbpackager found in $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml"; 444 444 } 445 445 } … … 449 449 @pkgs = ("pkg1") if (not @pkgs); 450 450 451 open(CONF,"> $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb") || die "Unable to create $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb";451 open(CONF,"> $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") || die "Unable to create $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml"; 452 452 print CONF << "EOF"; 453 453 --- … … 1347 1347 pb_vcs_checkin($pbconf{$ENV{'PBPROJ'}},"$pbconfpath",$msg); 1348 1348 } else { 1349 pb_log(0,"ERROR: no pbroot defined, used $ENV{'PBROOTDIR'}, without finding $ENV{'PBPROJ'}. pbin it\n");1349 pb_log(0,"ERROR: no pbroot defined, used $ENV{'PBROOTDIR'}, without finding $ENV{'PBPROJ'}.yml in it\n"); 1350 1350 pb_log(0," Please use -r release in order to be able to initialize your environment correctly\n"); 1351 die "Unable to open $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb";1351 die "Unable to open $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml"; 1352 1352 } 1353 1353 } … … 1359 1359 } else { 1360 1360 # Setup the variables from what has been stored at the end of cms2build 1361 my ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc ","pbroot");1361 my ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc.yml","pbroot"); 1362 1362 $ENV{'PBROOTDIR'} = $var->{$ENV{'PBPROJ'}}; 1363 1363 1364 ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc ","projver");1364 ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc.yml","projver"); 1365 1365 $ENV{'PBPROJVER'} = $var->{$ENV{'PBPROJ'}}; 1366 1366 1367 ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc ","projtag");1367 ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc.yml","projtag"); 1368 1368 $ENV{'PBPROJTAG'} = $var->{$ENV{'PBPROJ'}}; 1369 1369 1370 ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc ","pbpackager");1370 ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc.yml","pbpackager"); 1371 1371 $ENV{'PBPACKAGER'} = $var->{$ENV{'PBPROJ'}}; 1372 1372 -
devel/pb/bin/pb
r2256 r2258 565 565 % pb -p I<$project> -r I<$version> newproj I<$pkg> 566 566 567 to create the new project. Running the newproj command will then generate the file $pbdefdir/$project/pbconf/$version/$project. pb, and the directory $pbdefdir/$project/pbconf/$version/$pkg. You will need to edit those files to make the later commands work.567 to create the new project. Running the newproj command will then generate the file $pbdefdir/$project/pbconf/$version/$project.yml, and the directory $pbdefdir/$project/pbconf/$version/$pkg. You will need to edit those files to make the later commands work. 568 568 569 569 =head2 cms2build … … 573 573 =over 4 574 574 575 =item Update your $project. pbconfiguration file.575 =item Update your $project.yml configuration file. 576 576 577 577 You need to set the pburl, pbrepo, pbwf, pbpackager, projver, projtag, testver, delivery, and defpkgdir lines as described in the configuration file. The pburl entry is used to find the source for your package. The pbrepo entry is used to build the .repo or .sources.list files for use by downloaders of the package. The pbwf entry indicates that the source tar file is named by I<package-name>-I<version>. The pbpackager entry will be stored in the packages and should be you or your team. The projver/projtag entries indicate the version of the software and the version of the packaging scripts. The testver entry when true indicates that the package is in a test version, so no log file is computed (can be long), and version is made up using a timstamp. The delivery entry gives the subdirectory under which the packages will be delivered on the repository, and the defpkgdir entry corresponds to the local subdirectory hosting the package content. … … 595 595 % pb -p $project -r $version cms2build 596 596 597 To create the $pbdefdir/$project/pbdelivery/$project-$version.{,pbconf}.tar.gz files, the $version-$projtag. pb and pbrcfiles in the same directory.597 To create the $pbdefdir/$project/pbdelivery/$project-$version.{,pbconf}.tar.gz files, the $version-$projtag.yml and pbrc.yml files in the same directory. 598 598 599 599 =back … … 656 656 =item Run the cms2build command 657 657 658 If you have deleted your $package/pbdelivery directory, re-run the cms2build command as in the earlier step. This step is necessary to generate the I<package>/pbdelivery/pbrc file.658 If you have deleted your $package/pbdelivery directory, re-run the cms2build command as in the earlier step. This step is necessary to generate the I<package>/pbdelivery/pbrc.yml file. 659 659 660 660 =item Create the new virtual environment … … 672 672 =over 4 673 673 674 =item Update $project. pb674 =item Update $project.yml 675 675 676 676 You need to have a sshhost entry for setupve to work, so add one, even an invalid one, e.g.: … … 695 695 =over 4 696 696 697 =item Update $project. pb697 =item Update $project.yml 698 698 699 699 You need to have a valid sshdir and sshhost entry for build2ve to work, so add them. Note that you need to be able to ssh from the host you run the command on to the repository host, preferably without needing to type in a password, so using ssh-agent or having a special passwordless project-builder ssh key will make this step easier. … … 1373 1373 1374 1374 # Find all build files first relatively to PBROOTDIR 1375 # Find also all specific files referenced in the . pbconf file1375 # Find also all specific files referenced in the .yml conf file 1376 1376 my %bfiles = (); 1377 1377 my %pkgfiles = (); … … 1617 1617 # Keep track of per package version 1618 1618 pb_log(2,"DEBUG pkgs: ".Dumper(%pkgs)."\n"); 1619 open(PKG,"> $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb") || die "Unable to create $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb"; 1619 open(PKG,"> $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml") || die "Unable to create $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml"; 1620 print PKG "---\n"; 1620 1621 foreach my $pbpkg (keys %pkgs) { 1621 print PKG "pbpkg $pbpkg = $pkgs{$pbpkg}\n"; 1622 print PKG "pbpkg:\n"; 1623 print PKG " $pbpkg: $pkgs{$pbpkg}\n"; 1622 1624 } 1623 1625 close(PKG); … … 1625 1627 # Keep track of what is generated by default 1626 1628 # We need to store the dir and info on version-tag 1627 # Base our content on the existing .pb file 1628 copy("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb","$ENV{'PBDESTDIR'}/pbrc"); 1629 open(LAST,">> $ENV{'PBDESTDIR'}/pbrc") || die "Unable to create $ENV{'PBDESTDIR'}/pbrc"; 1630 print LAST "pbroot $ENV{'PBPROJ'} = $ENV{'PBROOTDIR'}\n"; 1631 print LAST "projver $ENV{'PBPROJ'} = $ENV{'PBPROJVER'}\n"; 1632 print LAST "projtag $ENV{'PBPROJ'} = $ENV{'PBPROJTAG'}\n"; 1633 print LAST "pbpackager $ENV{'PBPROJ'} = $ENV{'PBPACKAGER'}\n"; 1634 print LAST "pbextdir $ENV{'PBPROJ'} = $pbextdir\n"; 1629 # Base our content on the existing .yml file 1630 copy("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml","$ENV{'PBDESTDIR'}/pbrc.yml"); 1631 open(LAST,">> $ENV{'PBDESTDIR'}/pbrc.yml") || die "Unable to append to $ENV{'PBDESTDIR'}/pbrc.yml"; 1632 print LAST "pbroot:\n"; 1633 print LAST " $ENV{'PBPROJ'}: $ENV{'PBROOTDIR'}\n"; 1634 print LAST "projver:\n"; 1635 print LAST " $ENV{'PBPROJ'}: $ENV{'PBPROJVER'}\n"; 1636 print LAST "projtag:\n"; 1637 print LAST " $ENV{'PBPROJ'}: $ENV{'PBPROJTAG'}\n"; 1638 print LAST "pbpackager:\n"; 1639 print LAST " $ENV{'PBPROJ'}: $ENV{'PBPACKAGER'}\n"; 1640 print LAST "pbextdir:\n"; 1641 print LAST " $ENV{'PBPROJ'}: $pbextdir\n"; 1635 1642 close(LAST); 1636 1643 } … … 1670 1677 1671 1678 # Get content saved in cms2build 1672 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb","pbpkg");1679 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml","pbpkg"); 1673 1680 $pkg = { } if (not defined $pkg); 1674 1681 my $pbextdir = pb_get_extdir(); … … 1730 1737 1731 1738 # Get content saved in cms2build 1732 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb","pbpkg");1739 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml","pbpkg"); 1733 1740 $pkg = { } if (not defined $pkg); 1734 1741 my $pbextdir = pb_get_extdir(); … … 2202 2209 my $pkg = { }; 2203 2210 # Get content saved in cms2build 2204 if ((defined $ENV{'PBDESTDIR'}) && (defined $ENV{'PBPROJVER'}) && (defined $ENV{'PBPROJTAG'}) && (-f "$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb")) {2205 ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb","pbpkg");2211 if ((defined $ENV{'PBDESTDIR'}) && (defined $ENV{'PBPROJVER'}) && (defined $ENV{'PBPROJTAG'}) && (-f "$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml")) { 2212 ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml","pbpkg"); 2206 2213 $pkg = { } if (not defined $pkg); 2207 2214 } … … 2236 2243 } 2237 2244 # Adds conf file for availability of conf elements 2238 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb") if ((defined $ENV{'PBROOTDIR'}) && (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb"));2245 pb_conf_add("$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml") if ((defined $ENV{'PBROOTDIR'}) && (-f "$ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml")); 2239 2246 } 2240 2247 my ($rbsconf,$testver,$delivery) = pb_conf_get_if($conf,"testver","delivery"); … … 2248 2255 2249 2256 if ($cmt =~ /(V[EM]|RM)(build|prep)/) { 2250 $src="$src $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc$pbscript{$v}";2257 $src="$src $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc.yml $pbscript{$v}"; 2251 2258 } elsif ($cmt =~ /(V[EM]|RM)Script/) { 2252 2259 $src="$src $pbscript{$v}"; 2253 2260 } elsif ($cmt =~ /(V[EM]|RM)test/) { 2254 $src="$src $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}. pb $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc$pbscript{$v} $ENV{'PBDESTDIR'}/pbtest";2261 $src="$src $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.yml $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc.yml $pbscript{$v} $ENV{'PBDESTDIR'}/pbtest"; 2255 2262 } elsif (($cmt eq "Announce") || ($cmt eq "Web") || ($cmt eq "CPAN")) { 2256 2263 $src="$src $ENV{'PBTMP'}/pbscript"; … … 2754 2761 # Install from sandbox mean using the result of the just passed sbx2build command 2755 2762 # Get content saved in cms2build 2756 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb","pbpkg");2763 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml","pbpkg"); 2757 2764 my $pbextdir = pb_get_extdir(); 2758 2765 confess "Unable to get package list" if (not defined $pkg); … … 3586 3593 pb_vcs_up($scheme2,"$tmp"); 3587 3594 3588 # Update the . pbfile3589 open(FILE,"$ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}. pb") || die "Unable to open $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb";3590 open(OUT,"> $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}. pb.new") || die "Unable to write to $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb.new";3595 # Update the .yml file 3596 open(FILE,"$ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml") || die "Unable to open $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml"; 3597 open(OUT,"> $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml.new") || die "Unable to write to $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml.new"; 3591 3598 while(<FILE>) { 3592 3599 if (/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt$/) { 3593 3600 s/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt$/projver $ENV{'PBPROJ'} = $newvertxt/; 3594 pb_log(0,"Changing projver from $oldvertxt to $newvertxt in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}. pb\n");3601 pb_log(0,"Changing projver from $oldvertxt to $newvertxt in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml\n"); 3595 3602 } 3596 3603 if (/^testver/) { 3597 3604 s/^testver/#testver/; 3598 pb_log(0,"Commenting testver in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}. pb\n") if (/^testver/);3605 pb_log(0,"Commenting testver in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml\n") if (/^testver/); 3599 3606 } 3600 3607 if (/^delivery/) { 3601 3608 my $txt = $_; 3602 3609 chomp($txt); 3603 pb_log(0,"Please check delivery ($txt) in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}. pb\n");3610 pb_log(0,"Please check delivery ($txt) in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml\n"); 3604 3611 } 3605 3612 print OUT $_; … … 3607 3614 close(FILE); 3608 3615 close(OUT); 3609 rename("$ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}. pb.new","$ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb");3616 rename("$ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml.new","$ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml"); 3610 3617 3611 3618 # Checking pbcl files … … 3974 3981 } 3975 3982 3976 my ($addrepo) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc ","addrepo");3983 my ($addrepo) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc.yml","addrepo"); 3977 3984 my $pbrepo = pb_distro_get_param($pbos,$addrepo); 3978 3985 print SCRIPT << 'EOF'; … … 4002 4009 # Install from sandbox mean using the result of the just passed sbx2build command 4003 4010 # Get content saved in cms2build 4004 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb","pbpkg");4011 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml","pbpkg"); 4005 4012 my $pbextdir = pb_get_extdir(); 4006 4013 die "Unable to get package list" if (not defined $pkg); … … 4911 4918 4912 4919 # In script actions that file may not exist. 4913 return(\@pkgs) if ((not defined $ENV{'PBDESTDIR'}) || (not defined $ENV{'PBPROJVER'}) || (not defined $ENV{'PBPROJTAG'}) || (! -f "$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb"));4914 4915 my ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb","pbpkg");4920 return(\@pkgs) if ((not defined $ENV{'PBDESTDIR'}) || (not defined $ENV{'PBPROJVER'}) || (not defined $ENV{'PBPROJTAG'}) || (! -f "$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml")); 4921 4922 my ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml","pbpkg"); 4916 4923 @pkgs = keys %$var if (defined $var); 4917 4924 … … 5133 5140 sub pb_get_extdir { 5134 5141 5135 # the pbrc file should contain it and whatever the key, we take it5136 my ($ed) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc ","pbextdir");5142 # the pbrc.yml file should contain it and whatever the key, we take it 5143 my ($ed) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc.yml","pbextdir"); 5137 5144 pb_log(2,"ed: ".Dumper($ed)."\n"); 5138 5145 my $pbextdir = ""; … … 5157 5164 my %h; 5158 5165 my $h = \%h; 5159 $h = pb_conf_cache("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb",$h);5166 $h = pb_conf_cache("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml",$h); 5160 5167 $h->{'pbstep'}->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} = $pbstep; 5161 pb_conf_write("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}. pb",$h);5168 pb_conf_write("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.yml",$h); 5162 5169 } 5163 5170
Note:
See TracChangeset
for help on using the changeset viewer.