Changeset 1177 for devel/pb/lib/ProjectBuilder/Filter.pm
 Timestamp:
 Feb 7, 2011, 2:24:17 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

devel/pb/lib/ProjectBuilder/Filter.pm
r1156 r1177 53 53 54 54 The first parameter is the package name. 55 The second parameter is the distribution type. 56 The third parameter is the distribution family. 57 The fourth parameter is the distribution name. 58 The fifth parameter is the distribution version. 55 The second parameter is OS hash 59 56 60 57 The function returns a pointer on a hash of filters. … … 68 65 my ($mfile00, $mfile0, $mfile1, $mfile2, $mfile3); 69 66 my $pbpkg = shift  die "No package specified"; 70 my $dtype = shift  ""; 71 my $dfam = shift  ""; 72 my $ddir = shift  ""; 73 my $dver = shift  ""; 67 my $pbos = shift; 74 68 my $ptr = undef; # returned value pointer on the hash of filters 75 69 my %h; … … 78 72 if (d "$ENV{'PBROOTDIR'}/pbfilter") { 79 73 $mfile00 = "$ENV{'PBROOTDIR'}/pbfilter/all.pbf" if (f "$ENV{'PBROOTDIR'}/pbfilter/all.pbf"); 80 $mfile0 = "$ENV{'PBROOTDIR'}/pbfilter/$dtype.pbf" if (f "$ENV{'PBROOTDIR'}/pbfilter/$dtype.pbf"); 81 $mfile1 = "$ENV{'PBROOTDIR'}/pbfilter/$dfam.pbf" if (f "$ENV{'PBROOTDIR'}/pbfilter/$dfam.pbf"); 82 $mfile2 = "$ENV{'PBROOTDIR'}/pbfilter/$ddir.pbf" if (f "$ENV{'PBROOTDIR'}/pbfilter/$ddir.pbf"); 83 $mfile3 = "$ENV{'PBROOTDIR'}/pbfilter/$ddir$dver.pbf" if (f "$ENV{'PBROOTDIR'}/pbfilter/$ddir$dver.pbf"); 74 if (defined $pbos) { 75 $mfile0 = "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'type'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'type'}.pbf")); 76 $mfile1 = "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'family'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'family'}.pbf")); 77 $mfile2 = "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'name'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'name'}.pbf")); 78 $mfile3 = "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'name'}$pbos>{'version'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/pbfilter/$pbos>{'name'}$pbos>{'version'}.pbf")); 79 } 84 80 85 81 push @ffiles,$mfile00 if (defined $mfile00); … … 92 88 if (d "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter") { 93 89 $ffile00 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/all.pbf" if (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/all.pbf"); 94 $ffile0 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$dtype.pbf" if (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$dtype.pbf"); 95 $ffile1 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$dfam.pbf" if (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$dfam.pbf"); 96 $ffile2 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$ddir.pbf" if (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$ddir.pbf"); 97 $ffile3 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$ddir$dver.pbf" if (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$ddir$dver.pbf"); 98 90 if (defined $pbos) { 91 $ffile0 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'type'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'type'}.pbf")); 92 $ffile1 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'family'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'family'}.pbf")); 93 $ffile2 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'name'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'name'}.pbf")); 94 $ffile3 = "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'name'}$pbos>{'version'}.pbf" if ((defined $pbos>{'type'}) && (f "$ENV{'PBROOTDIR'}/$pbpkg/pbfilter/$pbos>{'name'}$pbos>{'version'}.pbf")); 95 } 99 96 push @ffiles,$ffile00 if (defined $ffile00); 100 97 push @ffiles,$ffile0 if (defined $ffile0);
Note: See TracChangeset
for help on using the changeset viewer.