Changeset 95 for devel/pb/bin/pb


Ignore:
Timestamp:
Sep 3, 2007, 7:21:53 PM (13 years ago)
Author:
Bruno Cornec
Message:

No more reading files under pkgdir but in project.pb for potential dedicated VERSION and TAG

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r94 r95  
    3636my $option = "";
    3737my @pkgs;
    38 my $pbtag;                  # Global TAG variable
    39 my $pbver;                  # Global VERSION variable
     38my $pbtag;                  # Global Tag variable
     39my $pbver;                  # Global Version variable
    4040my %pbver;                  # per package
    4141my %pbtag;                  # per package
     
    123123    pb_cms_init($ENV{'PBPROJ'});
    124124
     125    my ($pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$ENV{'PBPROJ'}.pb","pkgversion","pkgtag");
    125126    foreach my $pbpkg (@pkgs) {
    126         if (-f "$ENV{'PBROOT'}/$pbpkg/VERSION") {
    127             open(V,"$ENV{'PBROOT'}/$pbpkg/VERSION") || die "Unable to open $ENV{'PBROOT'}/$pbpkg/VERSION";
    128             $pbver = <V>;
    129             chomp($pbver);
    130             close(V);
     127        if (defined $pkgv->$pbpkg) {
     128            $pbver = $pkgv->$pbpkg;
    131129        } else {
    132130            $pbver = $ENV{'PBVER'};
    133131        }
    134 
    135         if (-f "$ENV{'PBROOT'}/$pbpkg/TAG") {
    136             open(T,"$ENV{'PBROOT'}/$pbpkg/TAG") || die "Unable to open $ENV{'PBROOT'}/$pbpkg/TAG";
    137             $pbtag = <T>;
    138             chomp($pbtag);
    139             close(T);
     132        if (defined $pkgt->$pbpkg) {
     133            $pbtag = $pkgt->$pbpkg;
    140134        } else {
    141135            $pbtag = $ENV{'PBTAG'};
    142136        }
     137
    143138        $pbrev = $ENV{'PBREVISION'};
    144139        print $LOG "\n" if ($debug >= 0);
Note: See TracChangeset for help on using the changeset viewer.