Changeset 1540


Ignore:
Timestamp:
May 13, 2012, 1:03:52 PM (7 years ago)
Author:
bruno
Message:
  • vmmonport is now optional
  • vmmem is also now really optional (wasn't working before as wasn't correctly tested)
  • We are allowed to kill the sleep during VMs wait without it aborting the process
  • newv(e|m) doesn't require execution of cms2build before being available
  • Fix another git support error introduced earlier
Location:
devel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1539 r1540  
    112112    'nover' => "false",
    113113    'rmdot' => "false",
     114    'useminor' => "false",
    114115    };
    115116$pbos->{'name'} = shift;
     
    644645sub pb_distro_get_param {
    645646
    646 my @param;
     647my @param = ();
    647648my $pbos = shift;
    648649
  • devel/pb-modules/lib/ProjectBuilder/Env.pm

    r1528 r1540  
    12101210    umask 0022;
    12111211    return(\%filteredfiles, \%supfiles, \%defpkgdir, \%extpkgdir);
     1212} elsif ($action =~ /^newv/) {
     1213    # No PBDESTDIR yet so doing nothing
     1214    return;
    12121215} else {
    12131216    # Setup the variables from what has been stored at the end of cms2build
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r1539 r1540  
    267267} elsif ($scheme =~ /^git/) {
    268268    open(GIT,"git --git-dir=$dir/.git remote -v |") || return("");
    269     while (<GITRC>) {
     269    while (<GIT>) {
    270270        next unless (/^origin\s+(\S+) \(push\)$/);
    271271        return $1;
    272272    }
    273     close(GITRC);
     273    close(GIT);
    274274    warn "Unable to find origin remote for $dir";
    275275    return "";
  • devel/pb/bin/pb

    r1539 r1540  
    23142314        die "-i iso parameter needed" if (((not defined $iso) || ($iso eq "")) && ($create != 0));
    23152315
    2316         # TODO: vmmonport should be optional
    2317         my ($ptr,$ptr2,$vmpath,$vmport,$vms,$vmmonport) = pb_conf_get("vmtype","vmcmd","vmpath","vmport","vmsize","vmmonport");
    2318         my ($vmopt,$vmmm,$vmtmout,$vmsnap,$vmbuildtm) = pb_conf_get_if("vmopt","vmmem","vmtmout","vmsnap","vmbuildtm");
     2316        my ($ptr,$ptr2,$vmpath,$vmport,$vms) = pb_conf_get("vmtype","vmcmd","vmpath","vmport","vmsize");
     2317        my ($vmopt,$vmmm,$vmtmout,$vmsnap,$vmbuildtm,$vmmonport) = pb_conf_get_if("vmopt","vmmem","vmtmout","vmsnap","vmbuildtm","vmmonport");
    23192318        my $vmsize = pb_distro_get_param($pbos,$vms);
    23202319
     
    23432342
    23442343        # How much memory to allocate for VMs
    2345         my $vmmem = pb_distro_get_param($pbos,$vmmm);
    2346         if (defined $vmmem) {
    2347             $ENV{'PBVMOPT'} .= " -m $vmmem";
     2344        if (defined $vmmm) {
     2345            my $vmmem = pb_distro_get_param($pbos,$vmmm);
     2346            if (defined $vmmem) {
     2347                $ENV{'PBVMOPT'} .= " -m $vmmem";
     2348            }
    23482349        }
    23492350
     
    23612362            if (($vmtype eq "kvm") || ($vmtype eq "qemu")) {
    23622363                # Configure the monitoring to automate the creation of the 'pb' snapshot
    2363                 $ENV{'PBVMOPT'} .= " -serial mon:telnet::$vmmonport->{$ENV{'PBPROJ'}},server,nowait";
     2364                $ENV{'PBVMOPT'} .= " -serial mon:telnet::$vmmonport->{$ENV{'PBPROJ'}},server,nowait" if ((defined $vmmonport) && (defined $vmmonport->{$ENV{'PBPROJ'}}));
    23642365                # In that case no snapshot call needed
    23652366                $ENV{'PBVMOPT'} =~ s/ -snapshot//;
     
    24242425                }
    24252426                pb_system("$cmd &","Launching the VM $vmm");
    2426                 # Using system allows to kill it externaly if needed
    2427                 pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up");
     2427                # Using system allows to kill it externaly if needed,sosupport that in the call
     2428                pb_system("sleep $ENV{'PBVMTMOUT'}","Waiting $ENV{'PBVMTMOUT'} s for VM $v to come up",undef,1);
    24282429                $vmpid = pb_check_ps($tmpcmd,$vmm);
    24292430                pb_log(0,"VM $vmm launched (pid $vmpid)\n");
Note: See TracChangeset for help on using the changeset viewer.