Module: tools
Branch: master
Commit: ae356dba9448ece065c5ee40308913d82b1abdf6
URL: https://source.winehq.org/git/tools.git/?a=commit;h=ae356dba9448ece065c5ee4…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Feb 3 04:34:50 2021 +0100
testbot/PatchUtils: Only update the Wine files list for Wine patches.
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(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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 dda855d..aeb8743 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.