Changeset 1186 in ProjectBuilder for devel/pb/lib
- Timestamp:
- Feb 14, 2011, 2:41:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/lib/ProjectBuilder/Filter.pm
r1184 r1186 144 144 my $destfile=shift; 145 145 my $pb=shift; 146 147 pb_log(2,"DEBUG: From $f to $destfile\n"); 146 my $tuple = "unknown"; 147 $tuple = "$pb->{'pbos'}->{'name'}-$pb->{'pbos'}->{'version'}-$pb->{'pbos'}->{'arch'}" if (defined $pb->{'pbos'}); 148 149 pb_log(2,"DEBUG: From $f to $destfile (tuple: $tuple)\n"); 150 pb_log(3,"DEBUG($tuple): pb ".Dumper($pb)."\n"); 148 151 pb_mkdir_p(dirname($destfile)) if (! -d dirname($destfile)); 149 152 open(DEST,"> $destfile") || die "Unable to create $destfile: $!"; … … 175 178 $tmp = ""; 176 179 } elsif (($s =~ /^PBPATCHSRC$/) && ($line =~ /^PBPATCHSRC$/)) { 177 pb_log(3,"DEBUG filtering PBPATCHSRC\n");180 pb_log(3,"DEBUG($tuple) filtering PBPATCHSRC\n"); 178 181 my $i = 0; 179 if (defined $pb->{'patches'}->{$pb->{'tuple'}}) { 180 foreach my $p (split(/,/,$pb->{'patches'}->{$pb->{'tuple'}})) { 182 pb_log(3,"DEBUG($tuple): pb ".Dumper($pb)."\n"); 183 pb_log(3,"DEBUG($tuple): pb/patches/tuple $pb->{'patches'}->{$tuple}\n"); 184 if (defined $pb->{'patches'}->{$tuple}) { 185 foreach my $p (split(/,/,$pb->{'patches'}->{$tuple})) { 186 pb_log(3,"DEBUG($tuple) Adding patch $i ".basename($p)."\n"); 181 187 print DEST "Patch$i: ".basename($p).".gz\n"; 182 188 $i++; … … 185 191 $tmp = ""; 186 192 } elsif (($s =~ /^PBMULTISRC$/) && ($line =~ /^PBMULTISRC$/)) { 187 pb_log(3,"DEBUG filtering PBMULTISRC\n");193 pb_log(3,"DEBUG($tuple) filtering PBMULTISRC\n"); 188 194 my $i = 1; 189 if (defined $pb->{'patches'}->{$pb->{'tuple'}}) { 190 foreach my $p (split(/,/,$pb->{'sources'}->{$pb->{'tuple'}})) { 195 if (defined $pb->{'patches'}->{$tuple}) { 196 foreach my $p (split(/,/,$pb->{'sources'}->{$tuple})) { 197 pb_log(3,"DEBUG($tuple) Adding source $i ".basename($p)."\n"); 191 198 print DEST "Source$i: ".basename($p)."\n"; 192 199 $i++; … … 195 202 $tmp = ""; 196 203 } elsif (($s =~ /^PBPATCHCMD$/) && ($line =~ /^PBPATCHCMD$/)) { 197 pb_log(3,"DEBUG filtering PBPATCHCMD\n");204 pb_log(3,"DEBUG($tuple) filtering PBPATCHCMD\n"); 198 205 my $i = 0; 199 if (defined $pb->{'patches'}->{$pb->{'tuple'}}) { 200 foreach my $p (split(/,/,$pb->{'patches'}->{$pb->{'tuple'}})) { 206 if (defined $pb->{'patches'}->{$tuple}) { 207 foreach my $p (split(/,/,$pb->{'patches'}->{$tuple})) { 208 pb_log(3,"DEBUG($tuple) Adding patch command $i\n"); 201 209 print DEST "%patch$i -p1\n"; 202 210 $i++; … … 233 241 my $pb=shift; 234 242 235 my $cp = "$ENV{'PBTMP'}/".basename($destfile)." $$";243 my $cp = "$ENV{'PBTMP'}/".basename($destfile).".$$"; 236 244 copy($destfile,$cp) || die "Unable to copy $destfile to $cp"; 237 245
Note:
See TracChangeset
for help on using the changeset viewer.