Changeset 1185 in ProjectBuilder for devel/pb/bin


Ignore:
Timestamp:
Feb 14, 2011, 1:13:31 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Fix pb for patches and additional sources support in parallel mode which was previously broken
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1179 r1185  
    822822
    823823        # Get project info on authors and log file
     824        # TODO: Make it CMS aware
    824825        $chglog = "$ENV{'PBROOTDIR'}/$pbpkg/pbcl";
    825826        $chglog = "$ENV{'PBROOTDIR'}/pbcl" if (! -f $chglog);
    826827        $chglog = undef if (! -f $chglog);
    827828
     829        # TODO: Make it CMS aware
    828830        my $authors = "$ENV{'PBROOTDIR'}/$pbpkg/pbauthors";
    829831        $authors = "$ENV{'PBROOTDIR'}/pbauthors" if (! -f $authors);
     
    838840
    839841        my %build;
    840         my %patches;
    841         my %sources;
    842842        # We want to at least build for the underlying distro
    843843        # except if a target was given, in which case we only build for it
     
    874874        $pb{'proj'} = $ENV{'PBPROJ'};
    875875        $pb{'repo'} = $ENV{'PBREPO'};
     876        my %patches = ();
     877        my %sources = ();
    876878        $pb{'patches'} = \%patches;
    877879        $pb{'sources'} = \%sources;
    878880        pb_log(2,"DEBUG: pb: ".Dumper(%pb)."\n");
    879881   
     882        my $tmpd = "$ENV{'PBTMP'}/cms.$$";
     883        pb_mkdir_p($tmpd) if (defined $pbparallel);
     884
     885        # Get only all.pbf filter at this stage for pbinit
     886        my $ptr = pb_get_filters($pbpkg);
     887
     888        # TODO: Make it CMS aware
     889        # Execute the pbinit script if any
     890        if (-x "$ENV{'PBROOTDIR'}/$pbpkg/pbinit") {
     891            pb_filter_file("$ENV{'PBROOTDIR'}/$pbpkg/pbinit",$ptr,"$ENV{'PBTMP'}/pbinit",\%pb);
     892            chmod 0755,"$ENV{'PBTMP'}/pbinit";
     893            pb_system("cd $dest ; $ENV{'PBTMP'}/pbinit","Executing init script from $ENV{'PBROOTDIR'}/$pbpkg/pbinit","verbose");
     894        }
     895
    880896        # Do not do that for website
    881897        if (not defined $web) {
    882             pb_log(0,"Build files are being generated for ...\n");
    883898            my %virt;
    884899            # De-duplicate similar VM/VE/RM
     
    898913                # Distro context
    899914                my $pbos = pb_distro_get_context($v);
     915
     916                # Get all filters to apply
     917                my $ptr = pb_get_filters($pbpkg,$pbos);
     918   
    900919                pb_log(2,"DEBUG Filtering PBDATE => $pbdate, PBTAG => $pbtag, PBVER => $pbver\n");
    901920   
     
    912931                my %bfiles = ();
    913932                my %pkgfiles = ();
    914                 $build{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} = "yes";
    915    
    916                 if (-d "$ENV{'PBROOTDIR'}/$pbpkg/$pbos->{'type'}") {
     933                # Used in Filter.pm by pb_filter_file
     934                $pb{'tuple'} = "$v";
     935
     936                $build{$v} = "yes";
     937                if (-d "$ENV{'PBROOTDIR'}/$pbpkg/$pbos->{'os'}") {
     938                    pb_list_bfiles("$ENV{'PBROOTDIR'}/$pbpkg/$pbos->{'os'}",$pbpkg,\%bfiles,\%pkgfiles,$supfiles);
     939                } elsif (-d "$ENV{'PBROOTDIR'}/$pbpkg/$pbos->{'type'}") {
    917940                    pb_list_bfiles("$ENV{'PBROOTDIR'}/$pbpkg/$pbos->{'type'}",$pbpkg,\%bfiles,\%pkgfiles,$supfiles);
    918941                } elsif (-d "$ENV{'PBROOTDIR'}/$pbpkg/$pbos->{'family'}") {
     
    925948                    pb_list_bfiles("$ENV{'PBROOTDIR'}/$pbpkg/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}",$pbpkg,\%bfiles,\%pkgfiles,$supfiles);
    926949                } else {
    927                     $build{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} = "no";
    928                     next;
     950                    $build{$v} = "no";
    929951                }
    930952                pb_log(2,"DEBUG bfiles: ".Dumper(\%bfiles)."\n");
    931953   
    932                 # Get all filters to apply
    933                 my $ptr = pb_get_filters($pbpkg,$pbos);
     954                if ($build{$v} ne "no") {
     955                    # Apply now all the filters on all the files concerned
     956                    # destination dir depends on the type of file
     957                    # For patch support
     958                    foreach my $f (values %bfiles,values %pkgfiles) {
     959                        pb_filter_file("$ENV{'PBROOTDIR'}/$f",$ptr,"$dest/pbconf/$v/".basename($f),\%pb);
     960                    }
     961                    # TODO: Make it CMS aware
     962                    pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbpatch", \%patches, $pbos, "$ENV{'PBROOTDIR'}/$pbpkg/pbextpatch");
     963                    pb_log(2,"DEBUG patches: ".Dumper(\%patches)."\n");
     964                    # TODO: Make it CMS aware
     965                    pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbsrc", \%sources, $pbos, "$ENV{'PBROOTDIR'}/$pbpkg/pbextsrc");
     966                    pb_log(2,"DEBUG sources: ".Dumper(\%sources)."\n");
    934967   
    935                 # Apply now all the filters on all the files concerned
    936                 # destination dir depends on the type of file
    937                 if (defined $ptr) {
    938                     # For patch support
    939                     $pb{'tuple'} = "$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}";
    940                     foreach my $f (values %bfiles,values %pkgfiles) {
    941                         pb_filter_file("$ENV{'PBROOTDIR'}/$f",$ptr,"$dest/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/".basename($f),\%pb);
     968                    if (defined $patches{$v}) {
     969                        # Filter potential patches (local + remote)
     970                        pb_mkdir_p("$dest/pbconf/$v/pbpatch");
     971                        foreach my $pf (split(/,/,$patches{$v})) {
     972                            my $pp = basename($pf);
     973                            pb_cms_export($pf,undef,"$dest/pbconf/$v/pbpatch");
     974                            pb_filter_file_inplace($ptr,"$dest/pbconf/$v/pbpatch/$pp",\%pb);
     975                            pb_system("gzip -9f $dest/pbconf/$v/pbpatch/$pp","","quiet");
     976                        }
     977                    }
     978                    if (defined $sources{$v}) {
     979                        pb_mkdir_p("$dest/pbconf/$v/pbsrc");
     980                        foreach my $pf (split(/,/,$sources{$v})) {
     981                            my $pp = basename($pf);
     982                            pb_cms_export($pf,undef,"$dest/pbconf/$v/pbsrc");
     983                            pb_filter_file_inplace($ptr,"$dest/pbconf/$v/pbsrc/$pp",\%pb);
     984                        }
    942985                    }
    943986                }
    944                 pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbpatch", \%patches, $pbos, "$ENV{'PBROOTDIR'}/$pbpkg/pbextpatch");
    945                 pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbsrc", \%sources, $pbos, "$ENV{'PBROOTDIR'}/$pbpkg/pbextsrc");
    946 
    947                 $pm->finish if (defined $pbparallel);
    948             }
     987
     988                if (defined $pbparallel) {
     989                    # Communicate results back to parent
     990                    my $str = "";
     991                    $str .= "build $v = $build{$v}\n" if (defined $build{$v});
     992                    $str .= "patches $v = $patches{$v}\n" if (defined $patches{$v});
     993                    $str .= "sources $v = $sources{$v}\n" if (defined $sources{$v});
     994                    pb_set_content("$tmpd/$$","$str");
     995                    $pm->finish;
     996                }
     997            }
     998            # In the parent, we need to get the result from the children
    949999            $pm->wait_all_children if (defined $pbparallel);
     1000            my $made = "";
     1001            my %h = ();
     1002            my %tmp;
     1003            my $pt;
     1004            my $k;
     1005
     1006            foreach $k (<$tmpd/*>) {
     1007                $made .= pb_get_content($k);
     1008            }
     1009            pb_rm_rf($tmpd);
     1010            pb_log(3,"MADE:\n$made");
     1011
     1012            # Rebuild local hashes
     1013            foreach $k (split(/\n/,$made)) {
     1014                if ($k =~ /^\s*([A-z0-9-_]+)\s+([[A-z0-9-_.]+)\s*=\s*(.+)$/) {
     1015                    $h{$1}->{$2}=$3;
     1016                }
     1017            }
     1018            pb_log(3,"HASH: ".Dumper(%h));
     1019
     1020            # Patches
     1021            pb_log(0,"Delivered and compressed patches ");
     1022            $pt = $h{'patches'};
     1023            foreach $k (split(/,/,values %$pt)) {
     1024                $tmp{$k} = "";
     1025            }
     1026            foreach $k (keys %tmp) {
     1027                $tmp{$k} = undef;
     1028                pb_log(0,"$k");
     1029            }
     1030            pb_log(0,"\n");
     1031
     1032            # Sources
     1033            pb_log(0,"Delivered additional sources ");
     1034            $pt = $h{'sources'};
     1035            foreach $k (split(/,/,values %$pt)) {
     1036                $tmp{$k} = "";
     1037            }
     1038            foreach $k (keys %tmp) {
     1039                pb_log(0,"$k");
     1040            }
     1041            pb_log(0,"\n");
     1042
     1043            # Build files
    9501044            my @found;
    9511045            my @notfound;
    952             foreach my $b (keys %build) {
    953                 push @found,$b if ($build{$b} =~ /yes/);
    954                 push @notfound,$b if ($build{$b} =~ /no/);
    955             }
    956             pb_log(0," ... ".join(',',sort(@found))."\n");
     1046            $pt = $h{'build'};
     1047            foreach my $b (keys %$pt) {
     1048                push @found,$b if ($pt->{$b} =~ /yes/);
     1049                push @notfound,$b if ($pt->{$b} =~ /no/);
     1050            }
     1051            pb_log(0,"Build files have been generated for ... ".join(',',sort(@found))."\n") if (@found);
    9571052            pb_log(0,"No Build files found for ".join(',',sort(@notfound))."\n") if (@notfound);
    958             pb_log(2,"DEBUG: patches: ".Dumper(%patches)."\n");
    959             pb_log(2,"DEBUG: sources: ".Dumper(%sources)."\n");
    960         }
    961 
    962         # Get the generic filter (all.pbf) and
    963         # apply those to the non-build files including those
    964         # generated by pbinit if applicable
    965 
    966         # Get only all.pbf filter
    967         my $ptr = pb_get_filters($pbpkg);
    968 
    969         my $liste ="";
    970         if (defined $filteredfiles->{$pbpkg}) {
    971             foreach my $f (split(/,/,$filteredfiles->{$pbpkg})) {
    972                 pb_filter_file_inplace($ptr,"$dest/$f",\%pb);
    973                 $liste = "$f $liste";
    974             }
    975         }
    976         pb_log(2,"Files ".$liste."have been filtered\n");
    977 
    978         # Do not do that for website
    979         if (not defined $web) {
    980             my %tmp;
    981             my $warnptcflag = 0;
    982             my $warnsrcflag = 0;
    983             # Filter potential patches (local + remote)
    984             pb_log(0,"Delivering and compressing patches ");
    985             foreach my $v (keys %patches) {
    986                 pb_mkdir_p("$dest/pbconf/$v/pbpatch");
    987                 foreach my $pf (split(/,/,$patches{$v})) {
    988                     my $pp = basename($pf);
    989                     if ($param eq "SandBox") {
    990                         $warnptcflag = 1;
    991                     }
    992                     pb_cms_export($pf,undef,"$dest/pbconf/$v/pbpatch");
    993                     pb_filter_file_inplace($ptr,"$dest/pbconf/$v/pbpatch/$pp",\%pb);
    994                     pb_system("gzip -9f $dest/pbconf/$v/pbpatch/$pp","","quiet");
    995                     $tmp{$pf} = "";
     1053
     1054            # Apply filters to the non-build files
     1055            my $liste ="";
     1056            if (defined $filteredfiles->{$pbpkg}) {
     1057                foreach my $f (split(/,/,$filteredfiles->{$pbpkg})) {
     1058                    pb_filter_file_inplace($ptr,"$dest/$f",\%pb);
     1059                    $liste = "$f $liste";
    9961060                }
    9971061            }
    998             pb_log(0,"Delivering additional sources ");
    999             foreach my $v (keys %sources) {
    1000                 pb_mkdir_p("$dest/pbconf/$v/pbsrc");
    1001                 foreach my $pf (split(/,/,$sources{$v})) {
    1002                     my $pp = basename($pf);
    1003                     if ($param eq "SandBox") {
    1004                         $warnsrcflag = 1;
    1005                     }
    1006                     pb_cms_export($pf,undef,"$dest/pbconf/$v/pbsrc");
    1007                     pb_filter_file_inplace($ptr,"$dest/pbconf/$v/pbsrc/$pp",\%pb);
    1008                     $tmp{$pf} = "";
     1062            pb_log(2,"Files ".$liste."have been filtered\n");
     1063
     1064            # Do we have additional script to run to prepare the environement for the project ?
     1065            # Then include it in the pbconf delivery
     1066            foreach my $pbvf (<$ENV{'PBROOTDIR'}/pbv*.pre>,<$ENV{'PBROOTDIR'}/pbv*.post>, <$ENV{'PBROOTDIR'}/pbtest*>) {
     1067                if (-x "$pbvf") {
     1068                    my $target = "$ENV{'PBDESTDIR'}/".basename($pbvf);
     1069                    pb_filter_file("$pbvf",$ptr,$target,\%pb);
     1070                    chmod 0755,"$target";
    10091071                }
    10101072            }
    1011             foreach my $v (keys %tmp) {
    1012                 pb_log(0,"$v ");
    1013             }
    1014             pb_log(0,"\n");
    1015             pb_log(0,"WARNING: Patches are always taken from repository not local export\n") if ($warnptcflag == 1);
    1016             pb_log(0,"WARNING: Sources are always taken from repository not local export\n") if ($warnsrcflag == 1);
    10171073        } else {
    10181074            # Instead call News generation
     
    10361092
    10371093        # Prepare the dest directory for archive
    1038         if (-x "$ENV{'PBROOTDIR'}/$pbpkg/pbinit") {
    1039             pb_filter_file("$ENV{'PBROOTDIR'}/$pbpkg/pbinit",$ptr,"$ENV{'PBTMP'}/pbinit",\%pb);
    1040             chmod 0755,"$ENV{'PBTMP'}/pbinit";
    1041             pb_system("cd $dest ; $ENV{'PBTMP'}/pbinit","Executing init script from $ENV{'PBROOTDIR'}/$pbpkg/pbinit","verbose");
    1042         }
    1043 
    1044         # Do we have additional script to run to prepare the environement for the project ?
    1045         # Then include it in the pbconf delivery
    1046         foreach my $pbvf (<$ENV{'PBROOTDIR'}/pbv*.pre>,<$ENV{'PBROOTDIR'}/pbv*.post>, <$ENV{'PBROOTDIR'}/pbtest*>) {
    1047             if (-x "$pbvf") {
    1048                 my $target = "$ENV{'PBDESTDIR'}/".basename($pbvf);
    1049                 pb_filter_file("$pbvf",$ptr,$target,\%pb);
    1050                 chmod 0755,"$target";
    1051             }
    1052         }
    1053 
    1054         # Archive dest dir
    10551094        chdir "$ENV{'PBDESTDIR'}" || die "Unable to change dir to $ENV{'PBDESTDIR'}";
    10561095        if (defined $preserve) {
     
    12211260            # We put every apps here under sys-apps. hope it's correct
    12221261            # We use pb's home dir in order to have a single OVERLAY line
    1223             my $tmpd = "$ENV{'HOME'}/portage/pb/sys-apps/$pbpkg";
    1224             pb_mkdir_p($tmpd) if (! -d "$tmpd");
     1262            my $tmpe = "$ENV{'HOME'}/portage/pb/sys-apps/$pbpkg";
     1263            pb_mkdir_p($tmpe) if (! -d "$tmpe");
    12251264            pb_mkdir_p("$ENV{'HOME'}/portage/distfiles") if (! -d "$ENV{'HOME'}/portage/distfiles");
    12261265
    12271266            # We need to first extract the ebuild file
    1228             @ebuildfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$tmpd","ebuild");
     1267            @ebuildfile = pb_extract_build_files($src2,"$pbpkg-$pbver/pbconf/$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}/","$tmpe","ebuild");
    12291268
    12301269            # Prepare the build env for gentoo
     
    12581297                if ($f =~ /\.ebuild$/) {
    12591298                    pb_distro_installdeps($f,$pbos);
    1260                     move($f,"$tmpd/$pbpkg-$pbver.ebuild");
    1261                     pb_system("cd $tmpd ; ebuild $pbpkg-$pbver.ebuild clean ; ebuild $pbpkg-$pbver.ebuild digest ; ebuild $pbpkg-$pbver.ebuild package","verbose");
     1299                    move($f,"$tmpe/$pbpkg-$pbver.ebuild");
     1300                    pb_system("cd $tmpe ; ebuild $pbpkg-$pbver.ebuild clean ; ebuild $pbpkg-$pbver.ebuild digest ; ebuild $pbpkg-$pbver.ebuild package","verbose");
    12621301                    # Now move it where pb expects it
    12631302                    pb_mkdir_p("$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg");
     
    12661305                        my $ntag = $pbtag;
    12671306                        $ntag =~ s/^0\.//;
    1268                         move("$tmpd/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver"."_p$ntag.ebuild");
     1307                        move("$tmpe/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver"."_p$ntag.ebuild");
    12691308                        $made="$made portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver"."_p$ntag.ebuild";
    12701309                    } else {
    1271                         move("$tmpd/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-r$pbtag.ebuild");
     1310                        move("$tmpe/$pbpkg-$pbver.ebuild","$ENV{'PBBUILDDIR'}/portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-r$pbtag.ebuild");
    12721311                        $made="$made portage/pb/sys-apps/$pbpkg/$pbpkg-$pbver-r$pbtag.ebuild";
    12731312                    }
     
    35193558my $supfiles = shift;
    35203559
     3560pb_log(2,"DEBUG: entering pb_list_bfiles: ".Dumper($bfiles)."\n");
    35213561opendir(BDIR,"$dir") || die "Unable to open dir $dir: $!";
    35223562foreach my $f (readdir(BDIR)) {
     
    35343574}
    35353575closedir(BDIR);
     3576pb_log(2,"DEBUG: exiting pb_list_bfiles: ".Dumper($bfiles)."\n");
     3577}
     3578
     3579sub pb_add_coma {
     3580
     3581my $str = shift;
     3582my $addstr = shift;
     3583
     3584$str .= "," if (defined $str);
     3585$str .= $addstr;
     3586return($str);
    35363587}
    35373588
     
    35393590
    35403591my $sdir = shift;
    3541 my $sources = shift;
     3592my $ptr = shift;
    35423593my $pbos = shift;
    35433594my $extdir = shift;
     3595
     3596pb_log(2,"DEBUG: entering pb_list_sfiles: ".Dumper($ptr)."\n");
     3597my $key = "$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}";
    35443598
    35453599# Prepare local sources for this distro - They are always applied first - May be a problem one day
    35463600# This function works for both patches and additional sources
    35473601foreach my $p (sort(<$sdir/*>)) {
    3548     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "," if ((defined $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) and ($p =~ /\.all$/));
    3549     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "file://$p" if ($p =~ /\.all$/);
    3550     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "," if ((defined $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) and ($p =~ /\.$pbos->{'type'}$/));
    3551     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "file://$p" if ($p =~ /\.$pbos->{'type'}$/);
    3552     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "," if ((defined $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) and ($p =~ /\.$pbos->{'family'}$/));
    3553     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "file://$p" if ($p =~ /\.$pbos->{'family'}$/);
    3554     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "," if ((defined $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) and ($p =~ /\.$pbos->{'name'}$/));
    3555     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "file://$p" if ($p =~ /\.$pbos->{'name'}$/);
    3556     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "," if ((defined $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) and ($p =~ /\.$pbos->{'name'}-$pbos->{'version'}$/));
    3557     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "file://$p" if ($p =~ /\.$pbos->{'name'}-$pbos->{'version'}$/);
    3558     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "," if ((defined $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"}) and ($p =~ /\.$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}$/));
    3559     $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "file://$p" if ($p =~ /\.$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}$/);
     3602    $ptr->{$key} = pb_add_coma($ptr->{$key},"file://$p") if (($p =~ /\.all$/) || ($p =~ /\.$pbos->{'os'}$/) || ($p =~ /\.$pbos->{'type'}$/) || ($p =~ /\.$pbos->{'family'}$/) || ($p =~ /\.$pbos->{'name'}$/) || ($p =~ /\.$pbos->{'name'}-$pbos->{'version'}$/) ||($p =~ /\.$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}$/));
    35603603}
    35613604
    35623605# Prepare also remote sources to be included - Applied after the local ones
    3563 foreach my $p ("all","$pbos->{'type'}","$pbos->{'family'}","$pbos->{'name'}","$pbos->{'name'}-$pbos->{'version'}","$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}") {
     3606foreach my $p ("all","$pbos->{'os'}","$pbos->{'type'}","$pbos->{'family'}","$pbos->{'name'}","$pbos->{'name'}-$pbos->{'version'}","$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}") {
    35643607    my $f = "$extdir.".".$p";
    35653608    next if (not -f $f);
     
    35703613    while (<PATCH>) {
    35713614        chomp();
    3572         $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "," if (defined $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"});
    3573         $sources->{"$pbos->{'name'}-$pbos->{'version'}-$pbos->{'arch'}"} .= "$_";
     3615        $ptr->{$key} = pb_add_coma($ptr->{$key},"$_");
    35743616    }
    35753617    close(PATCH);
    35763618}
    3577 pb_log(2,"DEBUG: sources: ".Dumper($sources)."\n");
     3619pb_log(2,"DEBUG: exiting pb_list_sfiles: ".Dumper($ptr)."\n");
    35783620}
    35793621   
Note: See TracChangeset for help on using the changeset viewer.