Changeset 174 for devel/pb/bin/pb


Ignore:
Timestamp:
Oct 5, 2007, 9:15:03 PM (12 years ago)
Author:
bruno
Message:

Handles pbpackager correctly, and especially in rpm build with a define

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r170 r174  
    146146
    147147    my ($pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$ENV{'PBPROJ'}.pb","pkgver","pkgtag");
     148
     149    # declare packager for filtering
     150    my ($tmp) = pb_conf_get("packager");
     151    my $pbpackager = $tmp->{$ENV{'PBPROJ'}};
     152
    148153    foreach my $pbpkg (@pkgs) {
    149154        $ENV{'PBPKG'} = $pbpkg;
     
    237242            print $LOG "DEBUG bfiles: ".Dumper(\%bfiles)."\n" if ($debug >= 1);
    238243
    239             # declare packager for filtering
    240             my ($pbpackager) = pb_conf_get("packager");
    241244            # Get all filters to apply
    242245            my $ptr = pb_get_filters($pbpkg, $dtype, $dfam, $ddir, $dver);
     
    246249            if (defined $ptr) {
    247250                foreach my $f (values %bfiles) {
    248                     pb_filter_file_pb("$ENV{'PBROOT'}/$f",$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$dtype,$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$defpkgdir,$extpkgdir);
     251                    pb_filter_file_pb("$ENV{'PBROOT'}/$f",$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$dtype,$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$defpkgdir,$extpkgdir, $pbpackager);
    249252                }
    250253                if (defined $filteredfiles->{$pbpkg}) {
    251254                    foreach my $f (split(/,/,$filteredfiles->{$pbpkg})) {
    252                         pb_filter_file("$ENV{'PBROOT'}/$dir/$f",$ptr,"$dest/$f",$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate);
     255                        pb_filter_file("$ENV{'PBROOT'}/$dir/$f",$ptr,"$dest/$f",$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$pbpackager);
    253256                    }
    254257                }
     
    318321    $pkg = { } if (not defined $pkg);
    319322
     323    # declare packager
     324    my ($tmp) = pb_conf_get("packager");
     325    my $pbpackager = $tmp->{$ENV{'PBPROJ'}};
     326
    320327    chdir "$ENV{'PBBUILDDIR'}";
    321328    my $made = ""; # pkgs made during build
     
    347354            foreach my $f (@specfile) {
    348355                if ($f =~ /\.spec$/) {
    349                     pb_system("rpmbuild --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}");
     356                    pb_system("rpmbuild --define \"packager $pbpackager\" --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}");
    350357                    last;
    351358                }
Note: See TracChangeset for help on using the changeset viewer.