Verify that all packages disable the "package notes" misfeature
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 4 Feb 2022 09:47:36 +0000 (09:47 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 4 Feb 2022 10:20:19 +0000 (10:20 +0000)
Goalfile

index af2e690..e504c78 100644 (file)
--- a/Goalfile
+++ b/Goalfile
@@ -209,15 +209,24 @@ let packages = [
     #"nbdkit",
 ]
 
+# Get the list of source packages.
 pure function get-source-packages () returning strings = {
     cd %fedora-dir
-    for f in %packages; do
-        if [ -f $f/%fedora-branch/$f.spec ]; then
-            echo "$f"
-        elif [ -f $f/%fedora-branch/dead.package ]; then
-            echo "WARNING: $f: is a dead package, ignored" >&2
+    for pkg in %packages; do
+        spec=$pkg/%fedora-branch/$pkg.spec
+        if [ -f $spec ]; then
+            # Check that all spec files have disabled the broken
+            # "package notes" misfeature.
+            if ! grep -sq "%%undefine _package_note_flags" $spec ; then
+                echo "ERROR: $pkg does not %%undefine _package_note_flags"
+                exit 1
+            fi
+            # OK to rebuild this package.
+            echo "$pkg"
+        elif [ -f $pkg/%fedora-branch/dead.package ]; then
+            echo "WARNING: $pkg: is a dead package, ignored" >&2
         else
-            echo "$f: package is not checked out locally" >&2
+            echo "$pkg: package is not checked out locally" >&2
             exit 1
         fi
     done