Changeset 702 for devel/pb/bin/pb


Ignore:
Timestamp:
Feb 19, 2009, 4:42:22 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • new function pb_distro_setuprepo (addition of repository on the fly at build time)
  • pb_get_dist_param => pb_distro_get_param and placed in Distribution
  • removal of last locale issue
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r698 r702  
    782782    open(LAST,">> $ENV{'PBDESTDIR'}/pbrc") || die "Unable to create $ENV{'PBDESTDIR'}/pbrc";
    783783    print LAST "pbroot $ENV{'PBPROJ'} = $ENV{'PBROOTDIR'}\n";
    784     print LAST "pbprojver $ENV{'PBPROJ'} = $ENV{'PBPROJVER'}\n";
    785     print LAST "pbprojtag $ENV{'PBPROJ'} = $ENV{'PBPROJTAG'}\n";
     784    print LAST "projver $ENV{'PBPROJ'} = $ENV{'PBPROJVER'}\n";
     785    print LAST "projtag $ENV{'PBPROJ'} = $ENV{'PBPROJTAG'}\n";
    786786    print LAST "pbpackager $ENV{'PBPROJ'} = $ENV{'PBPACKAGER'}\n";
    787787    close(LAST);
     
    841841                $specialdef = "--define \'_target_platform \"\"\'";
    842842            }
     843
     844            # If needed we may add repository to the build env
     845            my $darch = pb_get_arch();
     846            pb_distro_setuprepo($ddir,$dver,$darch,$dtype);
    843847            foreach my $f (@specfile) {
    844848                if ($f =~ /\.spec$/) {
     
    15191523                if ($dtype eq "rpm") {
    15201524
    1521                     my $verpmstyle = pb_get_dist_param($ddir,$dver,$darch,$verpmtype);
     1525                    my $verpmstyle = pb_distro_get_param($ddir,$dver,$darch,$verpmtype);
    15221526                    if ($verpmstyle eq "rinse") {
    15231527                        # Need to reshape the mirrors generated
    15241528                        my $post = "--before-post-install ";
    1525                         my $postparam = pb_get_dist_param($ddir,$dver,$darch,$veb4pi);
     1529                        my $postparam = pb_distro_get_param($ddir,$dver,$darch,$veb4pi);
    15261530                        if ($postparam eq "") {
    15271531                            $post = "";
     
    15321536                        # Need to reshape the package list for pb
    15331537                        my $addpkgs;
    1534                         $postparam = pb_get_dist_param($ddir,$dver,$darch,$vepkglist);
     1538                        $postparam = pb_distro_get_param($ddir,$dver,$darch,$vepkglist);
    15351539                        if ($postparam eq "") {
    15361540                            $addpkgs = "";
     
    18871891            my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd) = pb_distro_init($name,$ver);
    18881892   
    1889             my $postparam = pb_get_dist_param($ddir,$dver,$darch,$vepkglist);
     1893            my $postparam = pb_distro_get_param($ddir,$dver,$darch,$vepkglist);
    18901894            # Change the list of pkg in to a space separated list
    18911895            $postparam =~ s/,/ /g;
     
    25642568}
    25652569
    2566 sub pb_get_dist_param {
    2567 
    2568 my $param = "";
    2569 my $ddir = shift;
    2570 my $dver = shift;
    2571 my $darch = shift;
    2572 my $opt = shift;
    2573 
    2574 if (defined $opt->{"$ddir-$dver-$darch"}) {
    2575     $param = $opt->{"$ddir-$dver-$darch"};
    2576 } elsif (defined $opt->{"$ddir-$dver"}) {
    2577     $param = $opt->{"$ddir-$dver"};
    2578 } elsif (defined $opt->{"$ddir"}) {
    2579     $param = $opt->{"$ddir"};
    2580 } elsif (defined $opt->{"default"}) {
    2581     $param = $opt->{"default"};
    2582 } else {
    2583     $param = "";
    2584 }
    2585 return($param);
    2586 }
    2587 
    258825701;
Note: See TracChangeset for help on using the changeset viewer.