Changeset 112 for devel/pb/bin/pb


Ignore:
Timestamp:
Sep 6, 2007, 8:13:48 PM (12 years ago)
Author:
bruno
Message:

SImplification on hash management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r111 r112  
    3939my @date=(localtime->sec(), localtime->min(), localtime->hour(), localtime->mday(), localtime->mon(), localtime->year(), localtime->wday(), localtime->yday(), localtime->isdst());
    4040my $pbdate = strftime("%Y-%m-%d", @date);
     41my $pbdatecvs = strftime("%Y-%m-%d %H:%M:%S", @date);
    4142my $debug = 0;
    4243my $LOG = \*STDOUT;
     
    9192    = pb_env_init();
    9293}
    93 my %pbrc = %$pbrc;
    94 my %filteredfiles = %$filteredfiles;
    95 my %defpkgdir = %$defpkgdir;
    96 my %extpkgdir = %$extpkgdir;
    9794
    9895print $LOG "Project: $ENV{'PBPROJ'}\n" if ($debug >= 0);
     
    133130sub pb_cms2build {
    134131
    135     my $ptr = pb_get_pkg(\%defpkgdir,\%extpkgdir);
     132    my $ptr = pb_get_pkg($defpkgdir,$extpkgdir);
    136133    @pkgs = @$ptr;
    137     my $cms=pb_cms_init($ENV{'PBPROJ'},$pbdate);
     134    my $cms=pb_cms_init($ENV{'PBPROJ'});
    138135
    139136    my ($pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$ENV{'PBPROJ'}.pb","pkgver","pkgtag");
     
    151148
    152149        $pbrev = $ENV{'PBREVISION'};
    153         print $LOG "\n" if ($debug >= 0);
    154         print $LOG "Management of $pbpkg $pbver-$pbtag (rev $pbrev)\n" if ($debug >= 0);
     150        print $LOG "\n";
     151        print $LOG "Management of $pbpkg $pbver-$pbtag (rev $pbrev)\n";
    155152        die "Unable to get env var PBDESTDIR" if (not defined $ENV{'PBDESTDIR'});
    156153        # Clean up dest if necessary. The export will recreate it
     
    165162        my $dir = $defpkgdir{$pbpkg};
    166163        $dir = $extpkgdir{$pbpkg} if (not defined $dir);
    167         pb_cms_export($cms,$pbdate,"$ENV{'PBROOT'}/$dir",$dest);
     164        print "dir: $dir\n";
     165        pb_cms_export($cms,$pbdatecvs,"$ENV{'PBROOT'}/$dir",$dest);
    168166
    169167        # Extract cms log history and store it
     
    232230            if (defined $ptr) {
    233231                foreach my $f (values %bfiles) {
    234                     pb_filter_file_pb("$ENV{'PBROOT'}/$f",$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$dtype,$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,\%defpkgdir,\%extpkgdir);
     232                    pb_filter_file_pb("$ENV{'PBROOT'}/$f",$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$dtype,$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$defpkgdir,$extpkgdir);
    235233                }
    236234                if (defined $filteredfiles{$pbpkg}) {
     
    293291
    294292    # Get list of packages to build
    295     my $ptr = pb_get_pkg(\%defpkgdir,\%extpkgdir);
     293    my $ptr = pb_get_pkg($defpkgdir,$extpkgdir);
    296294    @pkgs = @$ptr;
    297295
     
    366364
    367365    # Get list of packages to build
    368     my $ptr = pb_get_pkg(\%defpkgdir,\%extpkgdir);
     366    my $ptr = pb_get_pkg($defpkgdir,$extpkgdir);
    369367    @pkgs = @$ptr;
    370368
     
    448446my $extpkgdir = shift;
    449447
    450 my %defpkgdir = %$defpkgdir;
    451 my %extpkgdir = %$extpkgdir;
    452 
    453448# Get packages list
    454449if (not defined $ARGV[0]) {
    455     @pkgs = keys %defpkgdir;
     450    @pkgs = keys %$defpkgdir;
    456451} elsif ($ARGV[0] =~ /^all$/) {
    457     @pkgs = keys %defpkgdir;
    458     push(@pkgs, keys %extpkgdir);
     452    @pkgs = keys %$defpkgdir;
     453    push(@pkgs, keys %$extpkgdir);
    459454} else {
    460455    @pkgs = @ARGV;
Note: See TracChangeset for help on using the changeset viewer.