Ignore:
Timestamp:
Feb 14, 2011, 2:41:25 PM (8 years ago)
Author:
bruno
Message:
  • Fix now pateches and sources delivery in parallel mode completely.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Filter.pm

    r1184 r1186  
    144144my $destfile=shift;
    145145my $pb=shift;
    146 
    147 pb_log(2,"DEBUG: From $f to $destfile\n");
     146my $tuple = "unknown";
     147$tuple = "$pb->{'pbos'}->{'name'}-$pb->{'pbos'}->{'version'}-$pb->{'pbos'}->{'arch'}" if (defined $pb->{'pbos'});
     148
     149pb_log(2,"DEBUG: From $f to $destfile (tuple: $tuple)\n");
     150pb_log(3,"DEBUG($tuple): pb ".Dumper($pb)."\n");
    148151pb_mkdir_p(dirname($destfile)) if (! -d dirname($destfile));
    149152open(DEST,"> $destfile") || die "Unable to create $destfile: $!";
     
    175178            $tmp = "";
    176179        } elsif (($s =~ /^PBPATCHSRC$/) && ($line =~ /^PBPATCHSRC$/)) {
    177             pb_log(3,"DEBUG filtering PBPATCHSRC\n");
     180            pb_log(3,"DEBUG($tuple) filtering PBPATCHSRC\n");
    178181            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");
    181187                    print DEST "Patch$i:         ".basename($p).".gz\n";
    182188                    $i++;
     
    185191            $tmp = "";
    186192        } elsif (($s =~ /^PBMULTISRC$/) && ($line =~ /^PBMULTISRC$/)) {
    187             pb_log(3,"DEBUG filtering PBMULTISRC\n");
     193            pb_log(3,"DEBUG($tuple) filtering PBMULTISRC\n");
    188194            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");
    191198                    print DEST "Source$i:         ".basename($p)."\n";
    192199                    $i++;
     
    195202            $tmp = "";
    196203        } elsif (($s =~ /^PBPATCHCMD$/) && ($line =~ /^PBPATCHCMD$/)) {
    197             pb_log(3,"DEBUG filtering PBPATCHCMD\n");
     204            pb_log(3,"DEBUG($tuple) filtering PBPATCHCMD\n");
    198205            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");
    201209                    print DEST "%patch$i -p1\n";
    202210                    $i++;
     
    233241my $pb=shift;
    234242
    235 my $cp = "$ENV{'PBTMP'}/".basename($destfile)."$$";
     243my $cp = "$ENV{'PBTMP'}/".basename($destfile).".$$";
    236244copy($destfile,$cp) || die "Unable to copy $destfile to $cp";
    237245
Note: See TracChangeset for help on using the changeset viewer.