Changeset 971 in ProjectBuilder


Ignore:
Timestamp:
Feb 18, 2010, 6:38:59 PM (14 years ago)
Author:
Bruno Cornec
Message:
  • First packages built and delivered with deboostrap (solve the shell expansion which should not be done for VE)
  • Previous snapshot removed before trying to create a new one to avoid useless extraction
Location:
devel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf

    r968 r971  
    213213ossuffix mandriva = mdv
    214214ossuffix lsb = lsb
     215#ossuffix rhel = rhel
    215216#ossuffix centos = el
    216217
  • devel/pb/bin/pb

    r968 r971  
    10831083    } elsif ($dtype eq "deb") {
    10841084        my $made2 = "";
     1085        foreach my $f (split(/ /,$made)) {
     1086            $made2 .= "../$f " if ($f =~ /\.changes$/);
     1087        }
    10851088        if (-f "/usr/bin/lintian") {
    1086             foreach my $f (split(/ /,$made)) {
    1087                 $made2 .= "../$f " if ($f =~ /\.changes$/);
    1088             }
    10891089            pb_system("lintian $made2","Checking validity of debs with lintian","verbose");
    10901090        } else {
     
    14251425        if ($vetype eq "chroot") {
    14261426            $shcmd = "sudo chroot $tpdir /bin/su - $mac -c ";
    1427             $cpcmd = "sudo cp -r ";
    14281427        } elsif ($vetype eq "schroot") {
    14291428            $shcmd = "schroot $tp -u $mac -- ";
    1430             $cpcmd = "sudo cp -r ";
    1431         }
     1429        }
     1430        $cpcmd = "sudo cp -r ";
    14321431        # We need to get the home dir of the target account to deliver in the right place
    14331432        open(PASS,"$tpdir/etc/passwd") || die "Unable to open $tpdir/etc/passwd";
     
    14841483        foreach my $p (split(/ +/,$src)) {
    14851484            my $j = basename($p);
    1486             pb_system("$cpcmd $cp2target/\'$p\' $ENV{'PBBUILDDIR'}/$odir/$over 2> /dev/null","Recovery of package $j in $ENV{'PBBUILDDIR'}/$odir/$over");
     1485            # For VM we don't want shell expansion to hapen locally but remotely
     1486            my $delim = '\'';
     1487            if ($cmt =~ /^VEbuild/) {
     1488                # For VE we need to support shell expansion locally
     1489                $delim = "";
     1490            }   
     1491            pb_system("$cpcmd $cp2target/$delim$p$delim $ENV{'PBBUILDDIR'}/$odir/$over 2> /dev/null","Recovery of package $j in $ENV{'PBBUILDDIR'}/$odir/$over");
    14871492            $made="$made $odir/$over/$j"; # if (($dtype ne "rpm") || ($j !~ /.src.rpm$/));
    14881493        }
     
    25162521
    25172522foreach my $v (@$vm) {
     2523    # Get distro context
     2524    my ($name,$ver,$darch) = split(/-/,$v);
     2525    chomp($darch);
     2526    my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init($name,$ver,$darch);
     2527    my ($vepath) = pb_conf_get("vepath");
     2528
     2529    # Test if an existing snapshot exists and remove it if there is a VE
     2530    if ((-f "$vepath->{$ENV{'PBPROJ'}}/$ddir-$dver-$darch.tar.gz") &&
     2531        (! -d "$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch")) {
     2532            pb_system("sudo rm -f $vepath->{$ENV{'PBPROJ'}}/$ddir-$dver-$darch.tar.gz","Removing previous snapshot $ddir-$dver-$darch.tar.gz");
     2533    }
     2534
    25182535    # Name of the account to deal with for VM/VE
    25192536    # Do not use the one passed potentially with -a
Note: See TracChangeset for help on using the changeset viewer.