[elbe-devel] [PATCH v2 11/15] validate: check for norecommend and output a verbose message

Torben Hohn torben.hohn at linutronix.de
Thu May 16 09:05:32 CEST 2019


because norecommend did the opposite, it was removed from the schema
and replaced with <install-recommends />.

Add a message about this to the validation output, so that its clear,
what has to be done.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/validate.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/elbepack/validate.py b/elbepack/validate.py
index 209823d0d..02435a96b 100644
--- a/elbepack/validate.py
+++ b/elbepack/validate.py
@@ -36,15 +36,23 @@ def validate_xml(fname):
     # We have errors, return them in string form...
     errors = []
     uses_xinclude = False
+    uses_norecommend = False
 
     for err in schema.error_log:
         errors.append("%s:%d error %s" % (err.filename, err.line, err.message))
         if "http://www.w3.org/2003/XInclude" in err.message:
             uses_xinclude = True
+        if "norecommend" in err.message:
+            uses_norecommend = True
 
     if uses_xinclude:
         errors.append("\nThere are XIncludes in the XML file. "
                       "Run 'elbe preprocess' first!\n")
+    if uses_norecommend:
+        errors.append("\nThe XML file uses <norecommend />. "
+                      "This function was broken all the time and did the "
+                      "opposite. If you want to retain the original "
+                      "behaviour, please specify <install-recommends /> !\n")
 
     return errors
 
-- 
2.11.0




More information about the elbe-devel mailing list