Changeset 144


Ignore:
Timestamp:
Sep 13, 2007, 11:06:04 AM (12 years ago)
Author:
bruno
Message:

Solve remaining pbs with VM management for copy of pkgs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r143 r144  
    453453
    454454    $port = $sshport->{$ENV{'PBPROJ'}};
    455     pb_system("ssh -q -p $port $mac \"mkdir -p $tdir ; cd $tdir ; rm -f $basesrc\"","Preparing $tdir on $mac");
     455    pb_system("ssh -q -p $port $mac \"mkdir -p $tdir ; cd $tdir ; echo \'for i in $basesrc; do if [ -f \$i ]; then rm -f \$i; fi; done\' | bash\"","Preparing $tdir on $mac");
    456456    pb_system("cd $ENV{'PBBUILDDIR'} ; scp -p -P $port $src $mac:$tdir 2> /dev/null","$cmt delivery in $tdir on $mac");
    457457    pb_system("ssh -q -p $port $mac \"echo \'cd $tdir ; if [ -f pbscript ]; then ./pbscript; fi\' | bash\"","Executing pbscript on $mac  if needed");
     
    471471            my $j = basename($p);
    472472            pb_system("scp -p -P $port $mac:\'$bdir/$p\' $ENV{'PBBUILDDIR'}/$odir/$over 2> /dev/null","Package recovery of $j in $tdir from $mac");
    473             $made="$made $odir/$over/$p";
     473            $made="$made $odir/$over/$j" if (($dtype ne "rpm") || ($j !~ /.src.rpm$/));
    474474        }
    475475        print KEEP "$made\n";
    476476        close(KEEP);
     477        pb_system("ssh -q -p $port $mac \"rm -rf $tdir\"","VM cleanup on $mac");
    477478        if (! $vmexist) {
    478             pb_system("ssh -q -p $port $mac \"rm -rf $tdir; sudo /usr/bin/poweroff \"; sleep 120 ; if [-d /proc/$vmexist]; then kill $vmexist; fi ; sleep 10","VM cleanup and halt on $mac");
     479            pb_system("ssh -q -p $port $mac \"sudo /usr/bin/poweroff \"; sleep 120 ; if [-d /proc/$vmexist]; then kill $vmexist; fi ; sleep 10","VM halt on $mac");
    479480        }
    480481        pb_send2ssh("Packages","$odir"."_"."$over");
Note: See TracChangeset for help on using the changeset viewer.