| Submitter | Darren Hart |
|---|---|
| Date | Oct. 18, 2011, 7 p.m. |
| Message ID | <4E9DCCE8.8090009@linux.intel.com> |
| Download | mbox | patch |
| Permalink | /patch/13421/ |
| State | Accepted |
| Commit | 80bd0c774fb691977b20e2d775212d849a33bf2b |
| Headers | show |
Comments
On 10/18/2011 12:00 PM, Darren Hart wrote: > 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. > > Signed-off-by: Darren Hart<dvhart@linux.intel.com> > --- > meta/classes/insane.bbclass | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass > index b861e85..017f7be 100644 > --- a/meta/classes/insane.bbclass > +++ b/meta/classes/insane.bbclass > @@ -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!
Patch
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index b861e85..017f7be 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -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)
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. Signed-off-by: Darren Hart <dvhart@linux.intel.com> --- meta/classes/insane.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)