Changeset 236


Ignore:
Timestamp:
Oct 22, 2007, 12:27:00 PM (13 years ago)
Author:
Bruno Cornec
Message:

Fix a bug for filtering non-build files, where filters were done in a per distro/ver loop.
Now only done once, after pbinit call thus also handling files it could have generated.
Only all.pbf has to be taken in account on those files => implies to reconfigure older pb project
to create systematically an all.pbf if additional files have to be filtered.
Should solve mondorescue build issues.

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r231 r236  
    259259                    pb_filter_file_pb("$ENV{'PBROOT'}/$f",$ptr,"$dest/pbconf/$ddir-$dver/".basename($f),$dtype,$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$defpkgdir,$extpkgdir,$pbpackager);
    260260                }
    261                 if (defined $filteredfiles->{$pbpkg}) {
    262                     foreach my $f (split(/,/,$filteredfiles->{$pbpkg})) {
    263                         pb_filter_file("$ENV{'PBROOT'}/$dir/$f",$ptr,"$dest/$f",$pbsuf,$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$pbpackager);
    264                     }
    265                 }
    266261            }
    267262        }
     
    282277            system("cd $dest ; $ENV{'PBCONF'}/$pbpkg/pbinit");
    283278        }
     279
     280        # Get the generic filter (all.pbf) and
     281        # apply those to the non-build files including those
     282        # generated by pbinit if applicable
     283
     284        # Get only all.pbf filter
     285        my $ptr = pb_get_filters($pbpkg);
     286
     287        my $liste ="";
     288        if (defined $filteredfiles->{$pbpkg}) {
     289            foreach my $f (split(/,/,$filteredfiles->{$pbpkg})) {
     290                pb_filter_file("$ENV{'PBROOT'}/$dir/$f",$ptr,"$dest/$f",$pbpkg,$pbver,$pbtag,$pbrev,$pbdate,$pbpackager);
     291                $liste = "$dest/$f $liste";
     292            }
     293        }
     294        print "$liste have been filtered\n";
    284295
    285296        # Archive dest dir
  • devel/pb/lib/ProjectBuilder/Base.pm

    r235 r236  
    462462my ($mfile00, $mfile0, $mfile1, $mfile2, $mfile3);
    463463my $pbpkg = shift || die "No package specified";
    464 my $dtype = shift || die "No dtype specified";
    465 my $dfam = shift || die "No dfam specified";
    466 my $ddir = shift || die "No ddir specified";
    467 my $dver = shift || die "No dver specified";
     464my $dtype = shift || "";
     465my $dfam = shift || "";
     466my $ddir = shift || "";
     467my $dver = shift || "";
    468468my $ptr; # returned value pointer on the hash of filters
    469469my %ptr;
     
    520520}
    521521
    522 # Function which applies filter on files (only for pb)
     522# Function which applies filter on pb build files
    523523sub pb_filter_file_pb {
    524524
     
    579579my %filter=%$ptr;
    580580my $destfile=shift;
    581 my $pbsuf=shift;
    582581my $pbpkg=shift;
    583582my $pbver=shift;
Note: See TracChangeset for help on using the changeset viewer.