Only update the list of Wine files if the patch is a Wine patch or will trigger a make_makefiles run (which means any new file could be used). Also reset IsWinePatch to evaluate later parts on their own merits. But note that if we had MakeMakefiles=1 despite IsWinePatch=0 (previous parts modified a Makefile.in file but are not unambiguously a Wine patch), if the last part modifies one of the files newly added to the Wine files list it will automatically get IsWinePatch=1; whereas if presented as a single patch it would still have had MakeMakefiles=1 + IsWinePatch=0. Fortunately the two cases are equivalent as far as Patches::Submit() is concerned.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- For the following wtbsuite test: WTBS S6.2 - Patch to a non-Wine file.
testbot/lib/WineTestBot/PatchUtils.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm index dda855d11..aeb874321 100644 --- a/testbot/lib/WineTestBot/PatchUtils.pm +++ b/testbot/lib/WineTestBot/PatchUtils.pm @@ -393,10 +393,14 @@ sub GetPatchImpacts($)
# Build a copy of the Wine files list reflecting the current situation. $Impacts->{WineFiles} = { %$_WineFiles } if (!$Impacts->{WineFiles}); - map { $Impacts->{WineFiles}->{$_} = 1 } keys %{$Impacts->{NewFiles}}; - map { delete $Impacts->{WineFiles}->{$_} } keys %{$Impacts->{DeletedFiles}}; - $Impacts->{NewFiles} = {}; - $Impacts->{DeletedFiles} = {}; + if ($Impacts->{IsWinePatch} or $Impacts->{MakeMakefiles}) + { + map { $Impacts->{WineFiles}->{$_} = 1 } keys %{$Impacts->{NewFiles}}; + map { delete $Impacts->{WineFiles}->{$_} } keys %{$Impacts->{DeletedFiles}}; + $Impacts->{NewFiles} = {}; + $Impacts->{DeletedFiles} = {}; + delete $Impacts->{IsWinePatch}; + }
# The modules impacted by previous parts will still need to be built, # but only if the last part justifies a build. So make a backup.