diff options
author | Ross Burton <ross.burton@arm.com> | 2025-06-04 15:03:22 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-05 11:02:22 +0100 |
commit | 632bb571d79e2b21c241357f9bdd623b0bc3bc1b (patch) | |
tree | 580224511331813241a31db24e5a5a8d04127afd | |
parent | 5de314ddb3d73731a3539e22d38e3a552a76abec (diff) | |
download | poky-632bb571d79e2b21c241357f9bdd623b0bc3bc1b.tar.gz |
recipetool/create: show more of the license path when it can't be identified
If there are multiple source trees in a project (incredibly common with
go-mod, for example) then the relative path of the LICENSE file from
the source tree could just be "LICENSE", which is not useful when there
are tens of files across the recipe with that name.
Show the parent directory name too, to clarify which file is unknown.
(From OE-Core rev: 9679f4055ad5a077c6b06aa6125cee4e8fa93471)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/recipetool/create.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index ea2ef5be63..94d52d6077 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
@@ -1250,7 +1250,7 @@ def match_licenses(licfiles, srctree, d): | |||
1250 | license = 'Unknown' | 1250 | license = 'Unknown' |
1251 | logger.info("Please add the following line for '%s' to a 'lib/recipetool/licenses.csv' " \ | 1251 | logger.info("Please add the following line for '%s' to a 'lib/recipetool/licenses.csv' " \ |
1252 | "and replace `Unknown` with the license:\n" \ | 1252 | "and replace `Unknown` with the license:\n" \ |
1253 | "%s,Unknown" % (os.path.relpath(licfile, srctree), md5value)) | 1253 | "%s,Unknown" % (os.path.relpath(licfile, srctree + "/.."), md5value)) |
1254 | if license: | 1254 | if license: |
1255 | licenses.append((license, os.path.relpath(licfile, srctree), md5value)) | 1255 | licenses.append((license, os.path.relpath(licfile, srctree), md5value)) |
1256 | 1256 | ||