[tools] testbot/web: Fix Apache intermittently not finding CreatePatches().

Francois Gouget fgouget at codeweavers.com
Thu Apr 1 08:52:34 CDT 2021


If CreatePatches() is not refered to with its full name Apache (mod_perl
really) intermittently fails to find it and issues an error of the form:

Undefined subroutine &WineTestBot::Jobs::CreatePatches called at .../testbot/lib/ObjectModel/Item.pm line 275.

Strangely enough it never has trouble finding any of the other Create*()
functions.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
If anyone can explain this mystery to me I would be grateful.
---
 testbot/lib/WineTestBot/Jobs.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm
index 5dbc1a7f4..a5ae13525 100644
--- a/testbot/lib/WineTestBot/Jobs.pm
+++ b/testbot/lib/WineTestBot/Jobs.pm
@@ -454,7 +454,10 @@ my @PropertyDescriptors = (
   CreateBasicPropertyDescriptor("Remarks", "Remarks", !1, !1, "A", 128),
   CreateBasicPropertyDescriptor("Submitted", "Submitted", !1, !1, "DT", 19),
   CreateBasicPropertyDescriptor("Ended", "Ended", !1, !1, "DT", 19),
-  CreateItemrefPropertyDescriptor("Patch", "Submitted from patch", !1, !1, \&CreatePatches, ["PatchId"]),
+  # Somehow mod_perl sometimes fails to find CreatePatches() if not given the
+  # fully qualified name, but never has any trouble with the other Create*()
+  # functions.
+  CreateItemrefPropertyDescriptor("Patch", "Submitted from patch", !1, !1, \&WineTestBot::Patches::CreatePatches, ["PatchId"]),
   CreateDetailrefPropertyDescriptor("Steps", "Steps", !1, !1, \&CreateSteps),
 );
 SetDetailrefKeyPrefix("Job", @PropertyDescriptors);
-- 
2.20.1




More information about the wine-devel mailing list