Changeset 314 in ProjectBuilder for devel/pb/bin/pb


Ignore:
Timestamp:
Feb 9, 2008, 9:29:56 AM (16 years ago)
Author:
Bruno Cornec
Message:
  • Big rewrite still WIP
  • lot of interface changes, pbconf relocated and split from project dir.
  • URL usage
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r313 r314  
    9999die pb_syntax() if (not defined $action);
    100100
    101 my ($pbrc, $filteredfiles, $supfiles, $defpkgdir, $extpkgdir);
     101my ($filteredfiles, $supfiles, $defpkgdir, $extpkgdir);
    102102my $pbinit = undef;
    103103$pbinit = 1 if ($action =~ /^newproj$/);
     
    106106# And get global params
    107107if (defined $opts{'p'}) {
    108     ($debug,$LOG, $pbrc, $filteredfiles, $supfiles, $defpkgdir, $extpkgdir)
     108    ($debug,$LOG, $filteredfiles, $supfiles, $defpkgdir, $extpkgdir)
    109109    = pb_env_init($opts{'p'},$pbinit);
    110110} else {
    111     ($debug,$LOG, $pbrc, $filteredfiles, $supfiles, $defpkgdir, $extpkgdir)
     111    ($debug,$LOG, $filteredfiles, $supfiles, $defpkgdir, $extpkgdir)
    112112    = pb_env_init(undef,$pbinit);
    113113}
     
    309309            }
    310310            print $LOG "Build files generated for ".join(',',@found)."\n";
    311             print $LOG "No Build files found for ".join(',',@notfound)."\n";
     311            print $LOG "No Build files found for ".join(',',@notfound)."\n" if (@notfound);
    312312        }
    313313        # Get the generic filter (all.pbf) and
     
    340340        print $LOG "Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz\n" if ($debug >= 0);
    341341
    342         # Keep track of what is generated for default
    343         open(LAST,"> $pbrc->{$ENV{'PBPROJ'}}") || die "Unable to create $pbrc->{$ENV{'PBPROJ'}}";
    344         print LAST "pbroot $pbprojver-$pbprojtag = $ENV{'PBROOT'}\n";
     342        # Keep track of what is generated by default
     343        open(LAST,"> $ENV{'PBDESTDIR'}/pbrc") || die "Unable to create $ENV{'PBDESTDIR'}/pbrc";
     344        #print LAST "pbroot $pbprojver-$pbprojtag = $ENV{'PBROOT'}\n";
     345        # Why not use pbproj ?
     346        print LAST "pbroot $ENV{'PBPROJ'} = $ENV{'PBROOT'}\n";
    345347        close(LAST);
    346348
    347349        # Keep track of per package version
    348         if (! -f "$ENV{'PBDESTDIR'}/$pbprojver-$pbprojtag.pb") {
    349             open(PKG,">$ENV{'PBDESTDIR'}/$pbprojver-$pbprojtag.pb") || die "Unable to create $ENV{'PBDESTDIR'}/$pbprojver-$pbprojtag.pb";
    350             print PKG "# Empty\n";
    351             close(PKG);
    352         }
    353         my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$pbprojver-$pbprojtag.pb","pbpkg");
     350        my ($pkg) = pb_conf_read_if("$ENV{'PBDESTDIR'}/$pbprojver-$pbprojtag.pb","pbpkg");
    354351        $pkg = { } if (not defined $pkg);
    355352        if ((not defined $pkg->{$pbpkg}) || ($pkg->{$pbpkg} ne "$pbver-$pbtag")) {
     
    660657        # Gather all required files to send them to the VM
    661658        # and launch the build thourgh pbscript
    662         pb_send2ssh("Script","$v",$vmexist,$vmpid,"vmhost","vmlogin","pbrc","vmport","vmtmout");
     659        pb_send2ssh("Script","$v",$vmexist,$vmpid,"vmhost","vmlogin","$ENV{'PBDESTDIR'}/pbrc","vmport","vmtmout");
    663660
    664661    }
     
    859856        # Gather all required files to send them to the VM
    860857        # and launch the build thourgh pbscript
    861         pb_send2ssh("VMs","$v",$vmexist,$vmpid,"vmhost","vmlogin","pbrc","vmport","vmtmout");
     858        pb_send2ssh("VMs","$v",$vmexist,$vmpid,"vmhost","vmlogin","$ENV{'PBDESTDIR'}/pbrc","vmport","vmtmout");
    862859    }
    863860}
     
    873870    my $res = pb_cms_isdiff($cms);
    874871    die "You need to have no differences before creating a new version" if ($res != 0);
    875     my $cmsurl = pb_cms_getinfo($cms);
     872    my $cmsurl = pb_cms_getinfo($cms,$ENV{'PBROOT'});
    876873    my $newurl = dirname($cmsurl)."/$newver";
    877874    pb_cms_copy($cms,$cmsurl,$newurl);
Note: See TracChangeset for help on using the changeset viewer.