Changeset 126


Ignore:
Timestamp:
Sep 9, 2007, 12:28:42 AM (11 years ago)
Author:
bruno
Message:

Report of fixes of 0.7.3 in devel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r118 r126  
    306306
    307307    chdir "$ENV{'PBBUILDDIR'}";
    308     my $made; # pkgs made during build
     308    my $made = ""; # pkgs made during build
    309309    foreach my $pbpkg (@pkgs) {
    310310        my $vertag = $pkg->{$pbpkg};
     
    338338                }
    339339            }
    340             $made="$made $ENV{'PBBUILDDIR'}/RPMS/*/$pbpkg-$pbver-$pbtag$pbsuf.*.rpm $ENV{'PBBUILDDIR'}/SRPMS/$pbpkg-$pbver-$pbtag$pbsuf.src.rpm"
     340            $made="$made $ENV{'PBBUILDDIR'}/RPMS/*/$pbpkg-$pbver-$pbtag$pbsuf.*.rpm $ENV{'PBBUILDDIR'}/SRPMS/$pbpkg-$pbver-$pbtag$pbsuf.src.rpm";
    341341        } elsif ($dtype eq "deb") {
    342342            my $tmp = "$ENV{'PBBUILDDIR'}/$pbpkg";
    343             $made="$made $tmp"."_*.deb $tmp"."_*.dsc $tmp"."_*.tar.gz"
     343            $made="$made $tmp"."_*.deb $tmp"."_*.dsc $tmp"."_*.tar.gz";
    344344        } elsif ($dtype eq "ebuild") {
    345             $made="$made $ENV{'PBBUILDDIR'}/portage/*/$pbpkg/$pbpkg-$pbver.ebuild"
     345            $made="$made $ENV{'PBBUILDDIR'}/portage/*/$pbpkg/$pbpkg-$pbver.ebuild";
    346346            pb_mkdir_p("$ENV{'PBBUILDDIR'}/portage") if (! -d "$ENV{'PBBUILDDIR'}/portage");
    347347        } elsif ($dtype eq "slackware") {
    348348            pb_mkdir_p("$ENV{'PBBUILDDIR'}/install") if (! -d "$ENV{'PBBUILDDIR'}/install");
    349             $made="$made $ENV{'PBBUILDDIR'}/build-$pbpkg/$pbpkg-$pbver-*-$pbtag.tgz"
     349            $made="$made $ENV{'PBBUILDDIR'}/build-$pbpkg/$pbpkg-$pbver-*-$pbtag.tgz";
    350350        } else {
    351351            die "Unknown dtype format $dtype";
     
    353353    }
    354354    # Keep track of what is generated so that we can get them back from VMs
    355     open(KEEP,"> $ENV{'PBDESTDIR'}/pbgen") || die "Unable to create $ENV{'PBBUILDDIR'}/pbgen";
     355    open(KEEP,"> $ENV{'PBBUILDDIR'}/pbgen-$pbprojver$pbprojtag") || die "Unable to create $ENV{'PBBUILDDIR'}/pbgen-$pbprojver$pbprojtag";
    356356    print KEEP "$made\n";
    357357    close(KEEP);
     
    408408    } elsif ($cmt eq "Packages") {
    409409        # Get package list from file made during build2pkg
    410         open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$vertag") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen";
    411         my $src = <KEEP>;
     410        open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$pbprojver$pbprojtag") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$pbprojver$pbprojtag";
     411        $src = <KEEP>;
    412412        chomp($src);
    413413        close(KEEP);
     
    420420        }
    421421    }
     422    my $basesrc = map { basename($_) } split(/ /,$src);
    422423
    423424    print $LOG "$cmt: $src\n" if ($debug >= 0);
     
    435436    }
    436437    $port = $sshport->{$ENV{'PBPROJ'}};
    437     pb_system("ssh -q -p $port $mac \"mkdir -p $tdir ; cd $tdir ; rm -f $src\"","Preparing $tdir on $mac");
     438    pb_system("ssh -q -p $port $mac \"mkdir -p $tdir ; cd $tdir ; rm -f $basesrc\"","Preparing $tdir on $mac");
    438439    pb_system("scp -p -P $port $src $mac:$tdir","$cmt delivery in $tdir on $mac");
    439     pb_system("ssh -q -p $port $mac \"cd $tdir ; if [ -f pbscript ]; then ./pbscript\"; fi","Executing pbscript on $mac");
     440    pb_system("ssh -q -p $port $mac \"echo \'cd $tdir ; if [ -f pbscript ]; then ./pbscript; rm -f ./pbscript; fi\' | bash\"","Executing pbscript on $mac  if needed");
    440441    if ($cmt eq "VMs") {
    441442            # Get back info on pkg produced, compute their name and get them from the VM
    442         pb_system("scp -p -P $port $mac:$tdir/pbgen-$vertag $ENV{'PBBUILDDIR'}","Get package names in $tdir on $mac");
    443         open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$vertag") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$vertag";
     443        pb_system("scp -p -P $port $mac:$tdir/pbgen-$pbprojver$pbprojtag $ENV{'PBBUILDDIR'}","Get package names in $tdir on $mac");
     444        open(KEEP,"$ENV{'PBBUILDDIR'}/pbgen-$pbprojver$pbprojtag") || die "Unable to read $ENV{'PBBUILDDIR'}/pbgen-$pbprojver$pbprojtag";
    444445        my $src = <KEEP>;
    445446        chomp($src);
    446447        close(KEEP);
    447448        pb_system("scp -p -P $port $mac:$tdir/{".join(',',$src)."} $ENV{'PBBUILDDIR'}/$odir/$over","Package recovery of in $tdir from $mac");
    448         pb_send2ssh("Packages","$odir_$over");
     449        pb_send2ssh("Packages","$odir"."_"."$over");
    449450        pb_rm_rf($ENV{'PBBUILDDIR'}/$odir);
    450451    }
     
    458459    open(SCRIPT,"> $ENV{'PBDESTDIR'}/pbscript") || die "Unable to create $ENV{'PBDESTDIR'}/pbscript";
    459460    print SCRIPT "#!/bin/bash\n";
     461    print SCRIPT "echo ... Execution needed\n";
    460462    print SCRIPT "# Move the copied .pbrc to the home dir on the build account\n";
    461463    print SCRIPT "mv .pbrc \$ENV{'HOME'}\n";
Note: See TracChangeset for help on using the changeset viewer.