Changeset 87 in ProjectBuilder for devel/pb/lib/ProjectBuilder


Ignore:
Timestamp:
Sep 3, 2007, 2:46:15 PM (17 years ago)
Author:
Bruno Cornec
Message:

confparam is gone. params are stored in .pbrc instead

Location:
devel/pb/lib/ProjectBuilder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Base.pm

    r82 r87  
    7676
    7777my %version = ();
    78 my %confparam = ();
    7978
    8079if (-f "$ENV{'PBCONF'}/$proj.pb") {
    81     # main parameter confparam (mandatory)
    8280    # List of pkg to build by default (mandatory)
    8381    # List of additional pkg to build when all is called (optional)
    8482    # Valid version names (optional)
    8583    # List of files to filter (optional)
    86     my $ptr = pb_conf_read("$ENV{'PBCONF'}/$proj.pb","confparam","defpkgdir","extpkgdir","version","filteredfiles");
    87     my ($confparam, $defpkgdir, $extpkgdir, $version, $filteredfiles) = @$ptr;
    88     print "DEBUG: confparam: ".Dumper($confparam)."\n" if ($debug >= 1);
     84    my $ptr = pb_conf_read("$ENV{'PBCONF'}/$proj.pb","defpkgdir","extpkgdir","version","filteredfiles");
     85    my ($defpkgdir, $extpkgdir, $version, $filteredfiles) = @$ptr;
    8986    print "DEBUG: defpkgdir: ".Dumper($defpkgdir)."\n" if ($debug >= 1);
    9087    print "DEBUG: extpkgdir: ".Dumper($extpkgdir)."\n" if ($debug >= 1);
    9188    print "DEBUG: version: ".Dumper($version)."\n" if ($debug >= 1);
    9289    print "DEBUG: filteredfiles: ".Dumper($filteredfiles)."\n" if ($debug >= 1);
    93     die "Unable to find confparam in $ENV{'PBCONF'}/$proj.pb" if (not defined $confparam);
    9490    die "Unable to find defpkgdir in $ENV{'PBCONF'}/$proj.pb" if (not defined $defpkgdir);
    95     %confparam = %$confparam;
    9691    # Global
    9792    %defpkgdir = %$defpkgdir;
     
    106101} else {
    107102    die "Unable to open $ENV{'PBCONF'}/$proj.pb";
    108 }
    109 
    110 #
    111 # Export content if needed
    112 #
    113 if (defined $confparam{"cvsroot"}) {
    114     $ENV{'CVSROOT'} = $confparam{"cvsroot"};
    115103}
    116104
     
    278266my $ret;
    279267
    280 my $cms = pb_conf_read("$ENV{'PBETC'}","cms");
     268my ($cms,$cvsroot) = pb_conf_read("$ENV{'PBETC'}","cms","cvsroot");
    281269die "No CMS defined for $proj" if (not defined $cms);
    282270my %cms = %$cms;
     
    295283    $ENV{'PBCMSLOGFILE'}="cvs.log";
    296284    $ENV{'PBCMSEXP'}="cvs export"
     285    #
     286    # Export content if needed
     287    #
     288    $ENV{'CVSROOT'} = $cvsroot{$proj} if (defined $cvsroot{$proj});
    297289} else {
    298290    die "CMS $cms{$proj} unknown";
  • devel/pb/lib/ProjectBuilder/Changelog.pm

    r74 r87  
    6666    my $n2date = &UnixDate($date,"%a, %d %b %Y %H:%M:%S %z");
    6767    #print "**$ndate**\n";
    68     my $confparam = pb_conf_read("$ENV{'PBCONF'}/$ENV{'PBPROJ'}.pb", "confparam");
    69     my %confparam = %$confparam;
     68    my $packager = pb_conf_read("$ENV{'PBETC'}", "packager");
     69    my %packager = %$packager;
    7070    if (($dtype eq "rpm") || ($dtype eq "fc")) {
    7171        if ($ver !~ /-/) {
     
    7979            $ver2 = "$ver$dsuf";
    8080        }
    81         print $OUTPUT "* $ndate $confparam{'packager'} $ver2\n";
     81        print $OUTPUT "* $ndate $packager{$ENV{'PBPROJ'}} $ver2\n";
    8282        print $OUTPUT "- Updated to $ver\n";
    8383        }
     
    102102
    103103    if ($dtype eq "deb") {
    104         print $OUTPUT " -- $confparam{'packager'} $n2date\n\n";
     104        print $OUTPUT " -- $packager{$ENV{'PBPROJ'}} $n2date\n\n";
    105105        print $OUTPUT "\n";
    106106        }
Note: See TracChangeset for help on using the changeset viewer.