Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/4] recipetool/create: show more of the license path when it can't be identified
@ 2025-06-04 14:03 Ross Burton
  2025-06-04 14:03 ` [PATCH 2/4] scripts/scriptutils: silence warning about S not existing in emptysrc Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ross Burton @ 2025-06-04 14:03 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 scripts/lib/recipetool/create.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index ea2ef5be637..94d52d60772 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -1250,7 +1250,7 @@ def match_licenses(licfiles, srctree, d):
                 license = 'Unknown'
                 logger.info("Please add the following line for '%s' to a 'lib/recipetool/licenses.csv' " \
                     "and replace `Unknown` with the license:\n" \
-                    "%s,Unknown" % (os.path.relpath(licfile, srctree), md5value))
+                    "%s,Unknown" % (os.path.relpath(licfile, srctree + "/.."), md5value))
         if license:
             licenses.append((license, os.path.relpath(licfile, srctree), md5value))
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-06-06 10:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04 14:03 [PATCH 1/4] recipetool/create: show more of the license path when it can't be identified Ross Burton
2025-06-04 14:03 ` [PATCH 2/4] scripts/scriptutils: silence warning about S not existing in emptysrc Ross Burton
2025-06-04 14:03 ` [PATCH 3/4] lib/oeqa/subprocesstweak: clean up __str__() Ross Burton
2025-06-04 14:03 ` [PATCH 4/4] oeqa/selftest: add test case for oeqa.utils.subprocesstweak Ross Burton
2025-06-05 18:17   ` [OE-core] " Mathieu Dubois-Briand
2025-06-06 10:27     ` Ross Burton

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