Opened 8 years ago

Closed 8 years ago

#80 closed defect (fixed)

Patches are not delivered to VMs in parallel mode

Reported by: knyar Owned by: bruno
Priority: major Milestone: 0.11.1
Component: pb Version: 0.10.1
Keywords: Cc:

Description

I've got a build configured for several VMs and tried to utilize parallel mode. However, as I found out, patches i've got configured for a specific OS do not get packed into <package>-<ver>.pbconf.tar.gz. It appears like \%patches (that supposed to be populated by pb_list_sfiles) gets reset by each fork.

Change History (6)

comment:1 Changed 8 years ago by knyar

Also, it looks wrong that pb_filter_file is caused BEFORE the pb_list_sfiles. I've used a quite obvious patch to make it work for me:

--- pb.orig     2011-02-14 19:30:23.000000000 +0300
+++ pb  2011-02-14 19:49:25.000000000 +0300
@@ -830,11 +830,7 @@
                                $virt{$d} = $d;
                        }
 
-                       # Try to use // processing here
-                       my $pm = new Parallel::ForkManager($pbparallel) if (defined $pbparallel);
-
                        foreach my $d (keys %virt) {
-                               $pm->start and next if (defined $pbparallel);
                                my ($name,$ver,$arch) = split(/-/,$d);
                                pb_log(0,"Bad format for $d") if ((not defined $name) || (not defined $ver) || (not defined $arch)) ;
                                chomp($arch);
@@ -873,6 +869,9 @@
                                }
                                pb_log(2,"DEBUG bfiles: ".Dumper(\%bfiles)."\n");
 
+                               pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbpatch", \%patches, $pb{'dtype'}, $dfam, $ddir, $dver, $arch, "$ENV{'PBROOTDIR'}/$pbpkg/pbextpatch");
+                               pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbsrc", \%sources, $pb{'dtype'}, $dfam, $ddir, $dver, $arch, "$ENV{'PBROOTDIR'}/$pbpkg/pbextsrc");
+
                                # Get all filters to apply
                                my $ptr = pb_get_filters($pbpkg, $pb{'dtype'}, $dfam, $ddir, $dver);
 
@@ -885,12 +884,7 @@
                                                pb_filter_file("$ENV{'PBROOTDIR'}/$f",$ptr,"$dest/pbconf/$ddir-$dver-$arch/".basename($f),\%pb);
                                        }
                                }
-                               pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbpatch", \%patches, $pb{'dtype'}, $dfam, $ddir, $dver, $arch, "$ENV{'PBROOTDIR'}/$pbpkg/pbextpatch");
-                               pb_list_sfiles("$ENV{'PBROOTDIR'}/$pbpkg/pbsrc", \%sources, $pb{'dtype'}, $dfam, $ddir, $dver, $arch, "$ENV{'PBROOTDIR'}/$pbpkg/pbextsrc");
-
-                               $pm->finish if (defined $pbparallel);
                        }
-                       $pm->wait_all_children if (defined $pbparallel);
                        my @found;
                        my @notfound;
                        foreach my $b (keys %build) {

comment:2 Changed 8 years ago by bruno

  • Status changed from new to assigned

Thanks for your report. I found out myself ... today (!) that projects with patches were not working anymore with 0.10.1.

The current version rev [1186] should fix this better, even, if all my tests are not finished yet. Either you can update pb from SVN to have it locally, or tell me your distribution so that I can provide you with packages to test.

comment:3 Changed 8 years ago by knyar

Thanks for the update, I will be happy to test. I am using Debian Lenny x86_64 for project-builder.

comment:4 Changed 8 years ago by bruno

Ok, I now have test packages for you at ftp://ftp.project-builder.org/test/debian/5.0

These packages allo wme to work in with patches now without issue anymore.

comment:5 Changed 8 years ago by knyar

Yep, seem to work fine now, thanks.

comment:6 Changed 8 years ago by bruno

  • Resolution set to fixed
  • Status changed from assigned to closed

Thanks for your report.

Note: See TracTickets for help on using tickets.