Changeset 500 in ProjectBuilder
- Timestamp:
- Aug 3, 2008, 1:20:30 PM (17 years ago)
- Location:
- devel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r495 r500 152 152 my $redir = ""; 153 153 154 pb_log(0,"$cmt... ") ;154 pb_log(0,"$cmt... ") if ($verbose ne "quiet"); 155 155 pb_log(1,"Executing $cmd\n"); 156 156 unlink("$ENV{'PBTMP'}/system.log") if (-f "$ENV{'PBTMP'}/system.log"); … … 158 158 system("$cmd $redir"); 159 159 my $res = $?; 160 # Exit now if the command may fail 161 if ((defined $verbose) and ($verbose eq "mayfail")) { 162 pb_log(0,"N/A\n") if ($res != 0); 163 pb_log(0,"OK\n") if ($res == 0); 164 return($res) 165 } 160 166 if ($res == -1) { 161 pb_log(0,"failed to execute ($cmd): $!\n") ;162 pb_display_file("$ENV{'PBTMP'}/system.log") if ( -f "$ENV{'PBTMP'}/system.log");167 pb_log(0,"failed to execute ($cmd): $!\n") if ($verbose ne "quiet"); 168 pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet")); 163 169 } elsif ($res & 127) { 164 pb_log(0, "child ($cmd) died with signal ".($? & 127).", ".($? & 128) ? 'with' : 'without'." coredump\n") ;165 pb_display_file("$ENV{'PBTMP'}/system.log") if ( -f "$ENV{'PBTMP'}/system.log");170 pb_log(0, "child ($cmd) died with signal ".($? & 127).", ".($? & 128) ? 'with' : 'without'." coredump\n") if ($verbose ne "quiet"); 171 pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet")); 166 172 } elsif ($res == 0) { 167 pb_log(0,"OK\n") ;168 pb_display_file("$ENV{'PBTMP'}/system.log") if ((defined $verbose) && (-f "$ENV{'PBTMP'}/system.log"));173 pb_log(0,"OK\n") if ($verbose ne "quiet"); 174 pb_display_file("$ENV{'PBTMP'}/system.log") if ((defined $verbose) and (-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet")); 169 175 } else { 170 pb_log(0, "child ($cmd) exited with value ".($? >> 8)."\n") ;171 pb_display_file("$ENV{'PBTMP'}/system.log") if ( -f "$ENV{'PBTMP'}/system.log");176 pb_log(0, "child ($cmd) exited with value ".($? >> 8)."\n") if ($verbose ne "quiet"); 177 pb_display_file("$ENV{'PBTMP'}/system.log") if ((-f "$ENV{'PBTMP'}/system.log") and ($verbose ne "quiet")); 172 178 } 173 179 return($res); -
devel/pb/bin/pb
r499 r500 521 521 my @pt; 522 522 my $tmpl = ""; 523 my @patches = ();523 my %patches; 524 524 525 525 @pt = pb_conf_get_if("vmlist","velist"); … … 547 547 $pb{'proj'} = $ENV{'PBPROJ'}; 548 548 $pb{'repo'} = $ENV{'PBREPO'}; 549 $pb{'patches'} = \%patches; 550 pb_log(2,"DEBUG: pb: ".Dumper(%pb)."\n"); 549 551 550 552 foreach my $d (split(/,/,$tmpl)) { … … 563 565 my %bfiles = (); 564 566 my %pkgfiles = (); 565 $build{"$ddir-$dver "} = "yes";567 $build{"$ddir-$dver-$arch"} = "yes"; 566 568 567 569 if (-d "$ENV{'PBROOTDIR'}/$pbpkg/$pb{'dtype'}") { … … 573 575 } elsif (-d "$ENV{'PBROOTDIR'}/$pbpkg/$ddir-$dver") { 574 576 pb_list_bfiles("$ENV{'PBROOTDIR'}/$pbpkg/$ddir-$dver",$pbpkg,\%bfiles,\%pkgfiles,$supfiles); 577 } elsif (-d "$ENV{'PBROOTDIR'}/$pbpkg/$ddir-$dver-$arch") { 578 pb_list_bfiles("$ENV{'PBROOTDIR'}/$pbpkg/$ddir-$dver-$arch",$pbpkg,\%bfiles,\%pkgfiles,$supfiles); 575 579 } else { 576 $build{"$ddir-$dver "} = "no";580 $build{"$ddir-$dver-$arch"} = "no"; 577 581 next; 578 582 } … … 582 586 my $ptr = pb_get_filters($pbpkg, $pb{'dtype'}, $dfam, $ddir, $dver); 583 587 584 # Prepare patches for this distro588 # Prepare local patches for this distro - They are always applied first - May be a problem one day 585 589 foreach my $p (sort(<$ENV{'PBROOTDIR'}/$pbpkg/pbpatch/*>)) { 586 push @patches,$p if ($p =~ /\.all$/); 587 push @patches,$p if ($p =~ /\.$pb{'dtype'}$/); 588 push @patches,$p if ($p =~ /\.$dfam$/); 589 push @patches,$p if ($p =~ /\.$ddir$/); 590 push @patches,$p if ($p =~ /\.$ddir-$dver$/); 591 } 592 $pb{'patches'} = \@patches; 590 $patches{"$ddir-$dver-$arch"} .= "," if ((defined $patches{"$ddir-$dver-$arch"}) and ($p =~ /\.all$/)); 591 $patches{"$ddir-$dver-$arch"} .= "file://$p" if ($p =~ /\.all$/); 592 $patches{"$ddir-$dver-$arch"} .= "," if ((defined $patches{"$ddir-$dver-$arch"}) and ($p =~ /\.$pb{'dtype'}$/)); 593 $patches{"$ddir-$dver-$arch"} .= "file://$p" if ($p =~ /\.$pb{'dtype'}$/); 594 $patches{"$ddir-$dver-$arch"} .= "," if ((defined $patches{"$ddir-$dver-$arch"}) and ($p =~ /\.$dfam$/)); 595 $patches{"$ddir-$dver-$arch"} .= "file://$p" if ($p =~ /\.$dfam$/); 596 $patches{"$ddir-$dver-$arch"} .= "," if ((defined $patches{"$ddir-$dver-$arch"}) and ($p =~ /\.$ddir$/)); 597 $patches{"$ddir-$dver-$arch"} .= "file://$p" if ($p =~ /\.$ddir$/); 598 $patches{"$ddir-$dver-$arch"} .= "," if ((defined $patches{"$ddir-$dver-$arch"}) and ($p =~ /\.$ddir-$dver$/)); 599 $patches{"$ddir-$dver-$arch"} .= "file://$p" if ($p =~ /\.$ddir-$dver$/); 600 $patches{"$ddir-$dver-$arch"} .= "," if ((defined $patches{"$ddir-$dver-$arch"}) and ($p =~ /\.$ddir-$dver-$arch$/)); 601 $patches{"$ddir-$dver-$arch"} .= "file://$p" if ($p =~ /\.$ddir-$dver-$arch$/); 602 } 603 604 # Prepare also remote patches to be included - Applied after the local ones 605 foreach my $p ("all","$pb{'dtype'}","$dfam","$ddir","$ddir-$dver","$ddir-$dver-$arch") { 606 my $f = "$ENV{'PBROOTDIR'}/$pbpkg/pbextpatch.$p"; 607 next if (not -f $f); 608 if (not open(PATCH,$f)) { 609 pb_display("Unable to open existing external patch file content $f\n"); 610 next; 611 } 612 while (<PATCH>) { 613 chomp(); 614 $patches{"$ddir-$dver-$arch"} .= "," if (defined $patches{"$ddir-$dver-$arch"}); 615 $patches{"$ddir-$dver-$arch"} .= "$_"; 616 } 617 close(PATCH); 618 } 619 pb_log(2,"DEBUG: pb->patches: ".Dumper($pb{'patches'})."\n"); 593 620 594 621 # Apply now all the filters on all the files concerned 595 622 # destination dir depends on the type of file 596 623 if (defined $ptr) { 624 # For patch support 625 $pb{'tuple'} = "$ddir-$dver-$arch"; 597 626 foreach my $f (values %bfiles,values %pkgfiles) { 598 pb_filter_file("$ENV{'PBROOTDIR'}/$f",$ptr,"$dest/pbconf/$ddir-$dver /".basename($f),\%pb);627 pb_filter_file("$ENV{'PBROOTDIR'}/$f",$ptr,"$dest/pbconf/$ddir-$dver-$arch/".basename($f),\%pb); 599 628 } 600 629 } … … 608 637 pb_log(0,"Build files generated for ".join(',',sort(@found))."\n"); 609 638 pb_log(0,"No Build files found for ".join(',',sort(@notfound))."\n") if (@notfound); 639 pb_log(2,"DEBUG: patches: ".Dumper(%patches)."\n"); 640 610 641 # Get the generic filter (all.pbf) and 611 642 # apply those to the non-build files including those … … 624 655 pb_log(2,"Files ".$liste."have been filtered\n"); 625 656 626 # Filter potential patches 627 pb_mkdir_p("$dest/pbconf/pbpatch"); 628 foreach my $p (sort(@patches)) { 629 my $pp = basename($p); 630 pb_filter_file($p,$ptr,"$dest/pbconf/pbpatch/$pp",\%pb); 631 pb_system("gzip -9 $dest/pbconf/pbpatch/$pp"); 632 } 657 # Filter potential patches (local + remote) 658 pb_log(0,"Delivering and compressing patches "); 659 foreach my $v (keys %patches) { 660 pb_mkdir_p("$dest/pbconf/$v/pbpatch"); 661 foreach my $pf (split(/,/,$patches{$v})) { 662 my $pp = basename($pf); 663 pb_cms_export($pf,undef,"$dest/pbconf/$v/pbpatch"); 664 pb_filter_file_inplace($ptr,"$dest/pbconf/$v/pbpatch/$pp",\%pb); 665 pb_system("gzip -9f $dest/pbconf/$v/pbpatch/$pp","","quiet"); 666 } 667 pb_log(0,"$patches{$v} "); 668 } 669 pb_log(0,"\n"); 633 670 634 671 # Prepare the dest directory for archive … … 685 722 @pkgs = @$ptr; 686 723 724 my $arch = pb_get_arch(); 725 687 726 my ($pkg) = pb_conf_read("$ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb","pbpkg"); 688 727 $pkg = { } if (not defined $pkg); … … 712 751 symlink "$src","$ENV{'PBBUILDDIR'}/SOURCES/".basename($src) || die "Unable to symlink $src in $ENV{'PBBUILDDIR'}/SOURCES"; 713 752 # We need to first extract the spec file 714 my @specfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$ddir-$dver /","$ENV{'PBBUILDDIR'}/SPECS");753 my @specfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$ddir-$dver-$arch/","$ENV{'PBBUILDDIR'}/SPECS","spec"); 715 754 716 755 # We need to handle potential patches to upstream sources 717 my @patchfiles = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/pbpatch/","$ENV{'PBBUILDDIR'}/SOURCES");756 pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$ddir-$dver-$arch/pbpatch/","$ENV{'PBBUILDDIR'}/SOURCES","patch"); 718 757 719 758 pb_log(2,"specfile: ".Dumper(\@specfile)."\n"); … … 742 781 chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver"; 743 782 pb_rm_rf("debian"); 744 symlink "pbconf/$ddir-$dver ","debian" || die "Unable to symlink to pbconf/$ddir-$dver";783 symlink "pbconf/$ddir-$dver-$arch","debian" || die "Unable to symlink to pbconf/$ddir-$dver-$arch"; 745 784 chmod 0755,"debian/rules"; 746 785 if ($dver !~ /[0-9]/) { … … 763 802 764 803 # We need to first extract the ebuild file 765 @ebuildfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$ddir-$dver /","$tmpd");804 @ebuildfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$ddir-$dver-$arch/","$tmpd","ebuild"); 766 805 767 806 # Prepare the build env for gentoo … … 811 850 pb_system("tar xfz $src2","Extracting pbconf"); 812 851 chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver"; 813 symlink "pbconf/$ddir-$dver ","install" || die "Unable to symlink to pbconf/$ddir-$dver";852 symlink "pbconf/$ddir-$dver-$arch","install" || die "Unable to symlink to pbconf/$ddir-$dver-$arch"; 814 853 if (-x "install/pbslack") { 815 854 pb_system("./install/pbslack","Building package"); … … 1188 1227 $v =~ s/,.*//; 1189 1228 1190 # Which is our local arch ? (standardize on i386 for those platforms) 1191 my $arch = `uname -m`; 1192 chomp($arch); 1193 $arch =~ s/i.86/i386/; 1229 my $arch = pb_get_arch(); 1194 1230 1195 1231 # Launch the VMs/VEs … … 2043 2079 my $dir=shift; 2044 2080 my $ddir=shift; 2081 my $mandatory=shift || "spec"; 2045 2082 my @files; 2046 2083 2084 my $flag = "mayfail" if ($mandatory eq "patch"); 2085 my $res; 2086 2047 2087 if ($src =~ /tar\.gz$/) { 2048 pb_system("tar xfpz $src $dir","Extracting build files");2088 $res = pb_system("tar xfpz $src $dir","Extracting $mandatory files from $src",$flag); 2049 2089 } elsif ($src =~ /tar\.bz2$/) { 2050 pb_system("tar xfpj $src $dir","Extracting build files");2090 $res = pb_system("tar xfpj $src $dir","Extracting $mandatory files from $src",$flag); 2051 2091 } else { 2052 2092 die "Unknown compression algorithm for $src"; 2053 2093 } 2094 # If not mandatory return now 2095 return() if (($res != 0) and ($mandatory eq "patch")); 2054 2096 opendir(DIR,"$dir") || die "Unable to open directory $dir"; 2055 2097 foreach my $f (readdir(DIR)) { 2056 2098 next if ($f =~ /^\./); 2099 # Skip potential patch dir 2100 next if ($f =~ /^pbpatch/); 2057 2101 move("$dir/$f","$ddir") || die "Unable to move $dir/$f to $ddir"; 2058 2102 pb_log(2,"mv $dir/$f $ddir\n"); … … 2100 2144 } 2101 2145 2146 # Which is our local arch ? (standardize on i386 for those platforms) 2147 sub pb_get_arch { 2148 2149 my $arch = `uname -m`; 2150 chomp($arch); 2151 $arch =~ s/i.86/i386/; 2152 return($arch); 2153 } 2154 2102 2155 1; -
devel/pb/lib/ProjectBuilder/CMS.pm
r452 r500 16 16 use English; 17 17 use File::Basename; 18 use File::Copy; 18 19 use POSIX qw(strftime); 19 20 use lib qw (lib); … … 109 110 This function exports a CMS content to a directory. 110 111 The first parameter is the URL of the CMS content. 111 The second parameter is the directory in which it is locally exposed (result of a checkout). 112 The second parameter is the directory in which it is locally exposed (result of a checkout). If undef, then use the original CMS content. 112 113 The third parameter is the directory where we want to deliver it (result of export). 113 114 … … 127 128 128 129 if ($scheme =~ /^svn/) { 129 if (-d $source) { 130 $tmp = $destdir; 131 } else { 132 $tmp = "$destdir/".basename($source); 133 } 134 pb_system("svn export $source $tmp","Exporting $source from SVN to $tmp"); 130 if (defined $source) { 131 if (-d $source) { 132 $tmp = $destdir; 133 } else { 134 $tmp = "$destdir/".basename($source); 135 } 136 pb_system("svn export $source $tmp","Exporting $source from SVN to $tmp"); 137 } else { 138 pb_system("svn export $uri $destdir","Exporting $uri from SVN to $destdir"); 139 } 135 140 } elsif ($scheme eq "dir") { 136 141 pb_system("cp -a $path $destdir","Copying $uri from DIR to $destdir"); … … 152 157 pb_mkdir_p($destdir); 153 158 154 # Check whether the file is well formed 155 # (containing already a directory with the project-version name) 156 my ($pbwf) = pb_conf_get_if("pbwf"); 157 if ((defined $pbwf) && (defined $pbwf->{$ENV{'PBPROJ'}})) { 158 $destdir = dirname($destdir); 159 if (defined $source) { 160 # Check whether the file is well formed 161 # (containing already a directory with the project-version name) 162 my ($pbwf) = pb_conf_get_if("pbwf"); 163 if ((defined $pbwf) && (defined $pbwf->{$ENV{'PBPROJ'}})) { 164 $destdir = dirname($destdir); 165 } 159 166 } 160 167 … … 174 181 # zip 175 182 pb_system("cd $destdir ; unzip $path","Extracting $path in $destdir"); 183 } else { 184 # simple file: copy it (patch e.g.) 185 copy($path,$destdir); 176 186 } 177 187 } elsif ($scheme =~ /^cvs/) { … … 179 189 my $dir=dirname($destdir); 180 190 my $base=basename($destdir); 181 # CVS also needs a modules name not a dir182 #if (-d $source) {191 if (defined $source) { 192 # CVS also needs a modules name not a dir 183 193 $tmp1 = basename($source); 184 #} else {185 # $tmp1 = dirname($source);186 #$tmp1 = basename($tmp1);187 #}194 } else { 195 # Probably not right, should be checked, but that way I'll notice it :-) 196 $tmp1 = $uri; 197 } 188 198 my $optcvs = ""; 189 199 … … 304 314 } elsif ($scheme =~ /^cvs/) { 305 315 pb_system("cvs co $url $destination","Checking out $url to $destination "); 316 } elsif ($scheme =~ /^file/) { 317 pb_cms_export($url,undef,$destination); 306 318 } else { 307 319 die "cms $scheme unknown"; … … 417 429 } 418 430 419 =item B<pb_cms_ isdiff>431 =item B<pb_cms_getpkg> 420 432 421 433 This function returns the list of packages we are working on in a CMS action. -
devel/pb/lib/ProjectBuilder/Env.pm
r484 r500 477 477 # 478 478 # PBREPO is replaced by the root URL to access the repository 479 filter PBREPO = \$pb repo479 filter PBREPO = \$pb->{'repo'} 480 480 481 481 # PBSRC is replaced by the source package location after the repo 482 482 #filter PBSRC = src/%{name}-%{version}.tar.gz 483 483 484 # PBVER is replaced by the version (\$pb verin code)485 filter PBVER = \$pb ver486 487 # PBDATE is replaced by the date (\$pb datein code)488 filter PBDATE = \$pb date484 # PBVER is replaced by the version (\$pb->{'ver'} in code) 485 filter PBVER = \$pb->{'ver'} 486 487 # PBDATE is replaced by the date (\$pb->{'date'} in code) 488 filter PBDATE = \$pb->{'date'} 489 489 490 490 # PBLOG is replaced by the changelog if value is yes 491 491 #filter PBLOG = yes 492 492 493 # PBTAG is replaced by the tag (\$pbtag in code) 494 filter PBTAG = \$pbtag 495 496 # PBREV is replaced by the revision (\$pbrev in code) 497 filter PBREV = \$pbrev 498 499 # PBPKG is replaced by the package name (\$pbpkg in code) 500 filter PBPKG = \$pbpkg 501 502 # PBPACKAGER is replaced by the packager name (\$pbpackager in code) 503 filter PBPACKAGER = \$pbpackager 493 # PBPATCHSRC is replaced by the patches names if value is yes 494 #filter PBPATCHSRC = yes 495 496 # PBPATCHCMD is replaced by the patches commands if value is yes 497 #filter PBPATCHCMD = yes 498 499 # PBTAG is replaced by the tag (\$pb->{'tag'} in code) 500 filter PBTAG = \$pb->{'tag'} 501 502 # PBREV is replaced by the revision (\$pb->{'rev'} in code) 503 filter PBREV = \$pb->{'rev'} 504 505 # PBPKG is replaced by the package name (\$pb->{'pkg'} in code) 506 filter PBPKG = \$pb->{'pkg'} 507 508 # PBPACKAGER is replaced by the packager name (\$pb->{'packager'} in code) 509 filter PBPACKAGER = \$pb->{'packager'} 504 510 505 511 # PBDESC contains the description of the package … … 527 533 #filter PBDEP = 528 534 529 # PBSUF is replaced by the package suffix (\$pb sufin code)530 filter PBSUF = \$pb suf535 # PBSUF is replaced by the package suffix (\$pb->{'suf'} in code) 536 filter PBSUF = \$pb->{'suf'} 531 537 532 538 # PBOBS is replaced by the Obsolete line … … 554 560 #filter PBDEP = 555 561 556 # PBSUF is replaced by the package suffix (\$pbsuf in code)562 # PBSUF is replaced by the package suffix (\$pbsuf'} in code) 557 563 filter PBSUF = %{dist} 558 564 … … 844 850 Url: PBURL 845 851 Source: PBREPO/PBSRC 852 #PBPATCHSRC 846 853 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) 847 854 #Requires: PBDEP … … 855 862 %prep 856 863 %setup -q 864 #PBPATCHCMD 857 865 858 866 %build -
devel/pb/lib/ProjectBuilder/Filter.pm
r499 r500 139 139 my $destfile=shift; 140 140 my $pb=shift; 141 my %pb = %$pb;142 141 143 142 pb_log(2,"DEBUG: From $f to $destfile\n"); … … 149 148 foreach my $s (keys %filter) { 150 149 # Process single variables 151 pb_log(2,"DEBUG filter{$s}: $filter{$s}\n");152 150 my $tmp = $filter{$s}; 153 151 next if (not defined $tmp); 152 pb_log(3,"DEBUG filter{$s}: $filter{$s}\n"); 154 153 # Expand variables if any single one found 155 pb_log(2,"DEBUG tmp: $tmp\n");156 154 if ($tmp =~ /\$/) { 155 # Order is important as we need to handle hashes refs before simple vars 156 eval { $tmp =~ s/(\$\w+-\>\{\'\w+\'\})/$1/eeg }; 157 157 eval { $tmp =~ s/(\$\w+)/$1/eeg }; 158 158 eval { $tmp =~ s/(\$\/)/$1/eeg }; 159 159 # special case for ChangeLog only for pb 160 160 } elsif (($s =~ /^PBLOG$/) && ($line =~ /^PBLOG$/)) { 161 my $p = $pb{'defpkgdir'}->{$pbpkg}; 162 $p = $pb{'extpkgdir'}->{$pbpkg} if (not defined $p); 163 pb_changelog($pb{'dtype'}, $pb{'pkg'}, $pb{'ver'}, $pb{'tag'}, $pb{'suf'}, $p, \*DEST, $tmp, $pb{'chglog'}); 161 pb_log(3,"DEBUG filtering PBLOG\n"); 162 my $p = $pb->{'defpkgdir'}->{$pb->{'pkg'}}; 163 $p = $pb->{'extpkgdir'}->{$pb->{'pkg'}} if (not defined $p); 164 pb_changelog($pb->{'dtype'}, $pb->{'pkg'}, $pb->{'ver'}, $pb->{'tag'}, $pb->{'suf'}, $p, \*DEST, $tmp, $pb->{'chglog'}); 164 165 $tmp = ""; 165 166 } elsif (($s =~ /^PBPATCHSRC$/) && ($line =~ /^PBPATCHSRC$/)) { 167 pb_log(3,"DEBUG filtering PBPATCHSRC\n"); 166 168 my $i = 0; 167 foreach my $p (sort @$pb{'patches'}) { 168 print DEST "Patch$i: $p\n"; 169 foreach my $p (split(/,/,$pb->{'patches'}->{$pb->{'tuple'}})) { 170 print DEST "Patch$i: ".basename($p).".gz\n"; 171 $i++; 169 172 } 170 173 $tmp = ""; 171 174 } elsif (($s =~ /^PBPATCHCMD$/) && ($line =~ /^PBPATCHCMD$/)) { 175 pb_log(3,"DEBUG filtering PBPATCHCMD\n"); 172 176 my $i = 0; 173 foreach my $p (sort @$pb{'patches'}) { 174 print DEST "%patch$i\n"; 177 foreach my $p (split(/,/,$pb->{'patches'}->{$pb->{'tuple'}})) { 178 print DEST "%patch$i -p1\n"; 179 $i++; 175 180 } 176 181 print DEST "\n"; … … 204 209 my $destfile=shift; 205 210 my $pb=shift; 206 my %pb = %$pb;207 211 208 212 my $cp = "$ENV{'PBTMP'}/".basename($destfile); 209 copy($destfile,$cp) || die "Unable to c reate$cp";213 copy($destfile,$cp) || die "Unable to copy $destfile to $cp"; 210 214 211 215 pb_filter_file($cp,$ptr,$destfile,$pb);
Note:
See TracChangeset
for help on using the changeset viewer.