Skip to contentSkip to conversation

insane.bbclass: print full path on invalid LICENSE_FILES_CHKSUM

PATCH Applied Darren Hart 2 participants 2 messages Oct 18, 2011 – Oct 20, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 insane.bbclass: print full path on invalid LICENSE_FILES_CHKSUM

Currently only the basename is printed when os.path.isfile() returns a failure for the license file. If the file is present, but in the wrong directory, this can be non-obvious to debug. Use the full path instead.

Make a minor grammatical correction in the error message while we're at it.

---
 meta/classes/insane.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/insane.bbclass +1 -1
index b861e85..017f7be 100644
@@ -330,7 +330,7 @@ def package_qa_check_license(workdir, d):
         (type, host, path, user, pswd, parm) = bb.decodeurl(url)
         srclicfile = os.path.join(srcdir, path)
         if not os.path.isfile(srclicfile):
-            raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to invalid file: " + path)
+            raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile)
 
         if 'md5' not in parm:
             bb.error(pn + ": md5 checksum is not specified for ", url)
Signature · 5 lines
1.7.1
-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
Applied
#1 lore raw
Quoted 16 lines · Darren Hart

Currently only the basename is printed when os.path.isfile() returns a failure for the license file. If the file is present, but in the wrong directory, this can be non-obvious to debug. Use the full path instead.

Make a minor grammatical correction in the error message while we're at it.

---
  meta/classes/insane.bbclass |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/insane.bbclass +0 -0
index b861e85..017f7be 100644

meta/classes/insane.bbclass def package_qa_check_license(workdir, d): · line 336

Quoted 8 lines
meta/classes/insane.bbclass +1 -1
@@ -330,7 +330,7 @@ def package_qa_check_license(workdir, d):
          (type, host, path, user, pswd, parm) = bb.decodeurl(url)
          srclicfile = os.path.join(srcdir, path)
          if not os.path.isfile(srclicfile):
-            raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to invalid file: " + path)
+            raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile)
 
          if 'md5' not in parm:
              bb.error(pn + ": md5 checksum is not specified for ", url)

Merged into OE-Core

Thanks
Sau!