Changeset 105


Ignore:
Timestamp:
Sep 4, 2007, 10:14:02 AM (12 years ago)
Author:
bruno
Message:

Preparing work on VM

Location:
devel
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r102 r105  
    112112    pb_cms2build();
    113113    pb_build2vm();
     114} elsif ($action =~ /^cms2ssh$/) {
     115    pb_cms2build();
     116    pb_build2vm();
     117    pb_build2ssh();
     118    pb_pkg2ssh();
    114119} else {
    115120    print $LOG "'$action' is not available\n";
     
    401406}
    402407
     408sub pb_build2vm {
     409    my ($vm,$all) = pb_get_vm();
     410}
     411
    403412sub pb_get_pkg {
    404413
     
    423432}
    424433
     434#
     435# Return the list of VMs we are working on
     436# $all is a flag to know if we return all of them
     437# or only some (if all we publish also tar files in addition to pkgs
     438#
    425439sub pb_get_vm {
    426440
    427441my @vm;
     442my $all = 0;
    428443
    429444# Get VM list
    430 if (not defined $ENV{'PBVM'}) {
    431     @vm = keys %defpkgdir;
    432 } elsif ($ENV{'PBVM'} =~ /^all$/) {
    433     @vm = keys %defpkgdir;
    434     if (defined %extpkgdir) {
    435         my $k = keys %extpkgdir;
    436         if (defined $k) {
    437             push(@vm, keys %extpkgdir);
    438         }
    439     }
    440 } else {
    441     @vm = $ENV{'PBVM'};
    442 }
     445if ((not defined $ENV{'PBVM'}) || ($ENV{'PBVM'} =~ /^all$/)) {
     446    my $ptr = pb_conf_get("vmlist");
     447    $ENV{'PBVM'} = $ptr->{$ENV{'PBPROJ'}};
     448    $all = 1;
     449}
     450@vm = split(/,/,$ENV{'PBVM'});
    443451print $LOG "VMs: ".join(',',@vm)."\n" if ($debug >= 0);
    444 return(\@vm);
     452return(\@vm,$all);
    445453}
    446454
     
    470478    print "pb (aka project-builder) Version $projectbuilderver-$projectbuilderrev\n";
    471479    print "\n";
    472     print "Syntax: pb [-vhqt][-r pbroot][-p project][-m \"mach-1...\"] <action> [<pkg1>...]\n";
     480    print "Syntax: pb [-vhqt][-r pbroot][-p project][-m \"mach-1[,...]\"] <action> [<pkg1>...]\n";
    473481    print "\n";
    474482    print "-h : This help file\n";
     
    487495    print "             (or use the env variable PBROOT)   \n";
    488496    print "\n";
     497    print "<params> can be the name of packages\n";
    489498    print "<action> can be:\n";
    490499    print "\n";
    491     print "\tcms2build: Create a tar file of the project under your CMS\n";
     500    print "\tcms2build: Create tar files for the project under your CMS\n";
    492501    print "\t           CMS supported are SVN and CVS\n";
    493502    print "\t           parameters are packages to build\n";
     
    500509    print "\t           if not using default list\n";
    501510    print "\n";
     511    print "\tbuild2ssh: Send the tar files to a SSH host               \n";
     512    print "\n";
     513    print "\tpkg2ssh:   Send the packages built to a SSH host          \n";
     514    print "\n";
    502515    print "\tcms2pkg:   cms2build + build2pkg\n";
    503516    print "\n";
  • devel/pb/lib/ProjectBuilder/Base.pm

    r101 r105  
    8282    # Valid version names (optional)
    8383    # List of files to filter (optional)
    84     my ($defpkgdir, $extpkgdir, $version, $filteredfiles) = pb_conf_read("$ENV{'PBCONF'}/$proj.pb","defpkgdir","extpkgdir","version","filteredfiles");
     84    my ($defpkgdir, $extpkgdir, $version, $filteredfiles, $pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$proj.pb","defpkgdir","extpkgdir","version","filteredfiles","projver","projtag");
    8585    print "DEBUG: defpkgdir: ".Dumper($defpkgdir)."\n" if ($debug >= 1);
    8686    print "DEBUG: extpkgdir: ".Dumper($extpkgdir)."\n" if ($debug >= 1);
     
    103103
    104104#
    105 # Set temp directory
    106 #
    107 if (not defined $ENV{'TMPDIR'}) {
    108     $ENV{'TMPDIR'}="/tmp";
    109 }
    110 $ENV{'PBTMP'} = tempdir( "pb.XXXXXXXXXX", DIR => $ENV{'TMPDIR'}, CLEANUP => 1 );
    111 
    112 #
    113105# Get global Version/Tag
    114106#
    115 my ($pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$proj.pb","projver","projtag");
    116107
    117108if (not defined $ENV{'PBVER'}) {
     
    132123}
    133124die "Invalid tag name $ENV{'PBTAG'} in $ENV{'PBCONF'}/$proj.pb" if ($ENV{'PBTAG'} !~ /[0-9.]+/);
     125
     126#
     127# Set temp directory
     128#
     129if (not defined $ENV{'TMPDIR'}) {
     130    $ENV{'TMPDIR'}="/tmp";
     131}
     132$ENV{'PBTMP'} = tempdir( "pb.XXXXXXXXXX", DIR => $ENV{'TMPDIR'}, CLEANUP => 1 );
    134133
    135134#
Note: See TracChangeset for help on using the changeset viewer.