Changeset 112


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

SImplification on hash management

Location:
devel/pb
Files:
2 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;
  • devel/pb/lib/ProjectBuilder/Base.pm

    r108 r112  
    277277my ($cms) = pb_conf_get("cms");
    278278# This one is optional
    279 my ($cvsroot) = pb_conf_read($ENV{'PBETC'},"cvsroot");
     279my ($cvsroot,$cvsrsh) = pb_conf_read($ENV{'PBETC'},"cvsroot","cvsrsh");
    280280
    281281if ($cms->{$proj} eq "svn") {
     
    295295    #
    296296    $ENV{'CVSROOT'} = $cvsroot->{$proj} if (defined $cvsroot->{$proj});
     297    $ENV{'CVSRSH'} = $cvsrsh->{$proj} if (defined $cvsrsh->{$proj});
    297298} else {
    298299    die "cms $cms->{$proj} unknown";
     
    314315        $tmp = $destdir."/".basename($source);
    315316    }
    316     pb_system("svn export $source $tmp","Exporting $source from SVN");
     317    pb_system("svn export $source $tmp","Exporting $source fr\"om SVN to $tmp");
    317318} elsif ($cms->{$ENV{'PBPROJ'}} eq "cvs") {
    318319    my $dir=dirname($destdir);
     
    321322    $tmp=basename($source);
    322323    # CVS needs a relative path !
    323     pb_system("cd $dir ; cvs export -D $pbdate -d $base $tmp","Exporting $source from CVS");
     324    pb_system("cd $dir ; cvs export -D \"$pbdate\" -d $base $tmp","Exporting $source from CVS to $destdir");
    324325} else {
    325326    die "cms $cms->{$ENV{'PBPROJ'}} unknown";
     
    333334
    334335if ($cms->{$ENV{'PBPROJ'}} eq "svn") {
    335     pb_system("svn log $pkgdir > $destfile","Extracting log info from SVN");
     336    pb_system("svn log -v $pkgdir > $destfile","Extracting log info from SVN");
    336337} elsif ($cms->{$ENV{'PBPROJ'}} eq "cvs") {
    337338    my $tmp=basename($pkgdir);
Note: See TracChangeset for help on using the changeset viewer.