From 620c29c386ae173cd69a22f56e90b5a3cf195c64 Mon Sep 17 00:00:00 2001
From: Martin Nilsson <nilsson@fastmail.com>
Date: Sun, 26 Dec 2021 14:08:23 +0100
Subject: [PATCH] Whitelist mkexpert from #pike directive.

---
 tools/release_checks.pike | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/release_checks.pike b/tools/release_checks.pike
index f81b6f7f0a..39704b307e 100644
--- a/tools/release_checks.pike
+++ b/tools/release_checks.pike
@@ -134,6 +134,10 @@ int test_unicode() {
 int test_realpike() {
   int status = 1;
 
+  multiset whitelist = (<
+    "lib/modules/Calendar.pmod/mkexpert.pike",
+  >);
+
   // bin and tools shouldn't really be #pike-ified, since they
   // should run with the pike it is bundled with.
   foreach( ({ "lib", /* "bin", "tools" */ }), string dir)
@@ -142,8 +146,8 @@ int test_realpike() {
       {
         string f = Stdio.read_file(path+file);
         if(!f) { write("Unable to read %O\n", path+file); continue; }
-	if(!has_value(f,"#pike")) {
-	  write("%s%s is missing a #pike directive.\n", path,file);
+        if(!whitelist[path+file] && !has_value(f,"#pike")) {
+          write("%s%s is missing a #pike directive.\n", path,file);
 	  status = 0;
 	}
       }
-- 
GitLab