archive mirror
 help / color / mirror / Atom feed
From: Lukas Bulwahn <>
To: Greg Kroah-Hartman <>,
Cc: Thomas Gleixner <>,,
	Lukas Bulwahn <>
Subject: [PATCH] scripts/ handle license identifiers in XML comments
Date: Sat, 26 Sep 2020 21:03:54 +0200	[thread overview]
Message-ID: <> (raw)

Commit cc9539e7884c ("media: docs: use the new SPDX header for GFDL-1.1 on
*.svg files") adds SPDX-License-Identifiers enclosed in XML comments,
i.e., <!-- ... -->, for svg files.

Unfortunately, ./scripts/ does not handle
SPDX-License-Identifiers in XML comments, so it simply fails on checking
these files with 'Invalid License ID: --'.

Strip the XML comment ending simply by copying how it was done for comments
in C. With that, ./scripts/ handles the svg files properly.

Signed-off-by: Lukas Bulwahn <>
applies cleanly on current master and next-20200925

Greg, please pick this quick minor patch for your spdx tree. thanks.

 scripts/ | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/ b/scripts/
index 6374e078a5f2..bc87200f9c7c 100755
--- a/scripts/
+++ b/scripts/
@@ -180,6 +180,9 @@ class id_parser(object):
                 # Remove trailing comment closure
                 if line.strip().endswith('*/'):
                     expr = expr.rstrip('*/').strip()
+                # Remove trailing xml comment closure
+                if line.strip().endswith('-->'):
+                    expr = expr.rstrip('-->').strip()
                 # Special case for SH magic boot code files
                 if line.startswith('LIST \"'):
                     expr = expr.rstrip('\"').strip()

                 reply	other threads:[~2020-09-26 19:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] scripts/ handle license identifiers in XML comments' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox