Changeset 749 for devel/pb/bin/pb


Ignore:
Timestamp:
Mar 30, 2009, 2:31:42 AM (11 years ago)
Author:
bruno
Message:
  • pb_get_arch placed lower in the modules tree and used everywhere uname was used
  • Adds the possibility to replace the post-install script for rinse to allow for a perl script replacement which is common between distributions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r748 r749  
    15791579        # Get VE context
    15801580        my ($ptr,$vetmout,$vepath,$verebuild,$veconf,$vepostinstall) = pb_conf_get("vetype","vetmout","vepath","verebuild","veconf");
    1581         my ($veb4pi,$vepkglist) = pb_conf_get_if("veb4pi","vepkglist");
     1581        my ($veb4pi,$vepi,$vepkglist) = pb_conf_get_if("veb4pi","vepi","vepkglist");
    15821582        my $vetype = $ptr->{$ENV{'PBPROJ'}};
    15831583
     
    16001600                    my $verpmstyle = pb_distro_get_param($ddir,$dver,$darch,$verpmtype);
    16011601                    if ($verpmstyle eq "rinse") {
    1602                         # Need to reshape the mirrors generated
    1603                         my $post = "--before-post-install ";
     1602                        # Need to reshape the mirrors generated with local before-post-install script
     1603                        my $b4post = "--before-post-install ";
    16041604                        my $postparam = pb_distro_get_param($ddir,$dver,$darch,$veb4pi);
     1605                        if ($postparam eq "") {
     1606                            $b4post = "";
     1607                        } else {
     1608                            $b4post .= $postparam;
     1609                        }
     1610                        # Do we have a local post-install script
     1611                        my $post = "--post-install ";
     1612                        $postparam = pb_distro_get_param($ddir,$dver,$darch,$vepi);
    16051613                        if ($postparam eq "") {
    16061614                            $post = "";
     
    16261634                        $rinseverb = "--verbose" if ($pbdebug gt 0);
    16271635
    1628                         pb_system("sudo /usr/sbin/rinse --directory \"$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch\" --arch \"$darch\" --distribution \"$ddir-$dver\" --config \"$veconf->{$ENV{'PBPROJ'}}\" $post $addpkgs $rinseverb","Creating the rinse VE for $ddir-$dver ($darch)", "verbose");
     1636                        pb_system("sudo /usr/sbin/rinse --directory \"$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch\" --arch \"$darch\" --distribution \"$ddir-$dver\" --config \"$veconf->{$ENV{'PBPROJ'}}\" $b4post $post $addpkgs $rinseverb","Creating the rinse VE for $ddir-$dver ($darch)", "verbose");
    16291637                    } elsif ($verpmstyle eq "mock") {
    16301638                        pb_system("sudo /usr/sbin/mock --init --resultdir=\"/tmp\" --configdir=\"$veconf->{$ENV{'PBPROJ'}}\" -r $v","Creating the mock VE for $ddir-$dver ($darch)");
     
    27282736}
    27292737
    2730 # Which is our local arch ? (standardize on i386 for those platforms)
    2731 sub pb_get_arch {
    2732 
    2733 my $arch = `uname -m`;
    2734 chomp($arch);
    2735 $arch =~ s/i.86/i386/;
    2736 return($arch);
    2737 }
    2738 
    273927381;
Note: See TracChangeset for help on using the changeset viewer.