Changeset 444


Ignore:
Timestamp:
May 19, 2008, 10:51:50 AM (11 years ago)
Author:
bruno
Message:

Solve a problem with multiple pbscript files by placing them in different dirs so that they are unique and do not create problems when recursing in send2target

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r443 r444  
    791791    my $vmpid = shift || 0;             # 0 is FALSE
    792792
    793     pb_log(2,"DEBUG: pb_send2target($cmt,$v,$vmexist,$vmpid)\n");
     793    pb_log(2,"DEBUG: pb_send2target($cmt,".Dumper($v).",$vmexist,$vmpid)\n");
    794794    my $host = "sshhost";
    795795    my $login = "sshlogin";
     
    855855
    856856    if (($cmt eq "vm") || ($cmt eq "ve")) {
    857         $src="$src $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc";
     857        $src="$src $ENV{'PBROOTDIR'}/$ENV{'PBPROJ'}.pb $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb $ENV{'PBETC'} $ENV{'PBDESTDIR'}/pbrc $ENV{'PBDESTDIR'}/pbscript";
    858858    } elsif ($cmt eq "Script") {
    859         # Nothing special to do
     859        $src="$src $ENV{'PBDESTDIR'}/pbscript";
    860860    } elsif ($cmt eq "Packages") {
    861861        # Get package list from file made during build2pkg
     
    864864        chomp($src);
    865865        close(KEEP);
    866 
    867     }
    868     # Systematically adds the pbscript except for Sources
    869     $src="$src $ENV{'PBDESTDIR'}/pbscript" if ($cmt ne "Sources");
     866        $src="$src $ENV{'PBBUILDDIR'}/pbscript" if ($cmt ne "Sources");
     867    }
    870868    # Remove potential leading spaces (cause problem with basename)
    871869    $src =~ s/^ *//;
     
    919917
    920918        # Repository management
    921         open(PBS,"> $ENV{'PBDESTDIR'}/pbscript") || die "Unable to create $ENV{'PBDESTDIR'}/pbscript";
     919        open(PBS,"> $ENV{'PBBUILDDIR'}/pbscript") || die "Unable to create $ENV{'PBBUILDDIR'}/pbscript";
    922920        if ($dtype eq "rpm") {
    923921            # Also make a pbscript to generate yum/urpmi bases
     
    960958        }
    961959        close(PBS);
     960        chmod 0755,"$ENV{'PBBUILDDIR'}/pbscript";
    962961
    963962    } else {
     
    998997    pb_system("$shcmd \"mkdir -p $tdir ; cd $tdir ; echo \'for i in $basesrc; do if [ -f \$i ]; then rm -f \$i; fi; done\ ; $cmd' | bash\"","Preparing $tdir on $cptarget");
    999998    pb_system("cd $ENV{'PBBUILDDIR'} ; $cpcmd $src $cptarget 2> /dev/null","$cmt delivery in $cptarget");
     999
    10001000    # For VE we need to change the owner manually - To be tested if needed
    10011001    #if ($cmt eq "ve") {
Note: See TracChangeset for help on using the changeset viewer.