diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2012-03-22 17:55:34 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-22 16:43:40 +0000 |
commit | bbf38aa898454a2bb9a4ac993eb2696fbd5f4e57 (patch) | |
tree | 8535741c1af787d1fd64218bfcdb76ef4fc83015 /meta | |
parent | 6c785bcd4368ea49941ec00bc8c34f334a39d8f3 (diff) | |
download | openembedded-core-bbf38aa898454a2bb9a4ac993eb2696fbd5f4e57.tar.gz openembedded-core-bbf38aa898454a2bb9a4ac993eb2696fbd5f4e57.tar.bz2 openembedded-core-bbf38aa898454a2bb9a4ac993eb2696fbd5f4e57.zip |
insane.bbclass: maybe no log.do_compile or log.do_install
The insane.bbclass grep in log.do_compile and log.do_install
unconditionally, but there maybe no such logs when mirror the pkg from
sstate cache file. We should check whether the log file exists or not
before grep in it.
Additionally, break the one too long line into two (Add a "\n").
[YOCTO #2153]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 6298136c39..fbeb97adce 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -612,19 +612,20 @@ python do_package_qa () { # Check the compile log for host contamination compilelog = os.path.join(logdir,"log.do_compile") - statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog - if os.system(statement) == 0: - bb.warn("%s: The compile log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \ - (pkg, compilelog)) - + if os.path.exists(compilelog): + statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog + if os.system(statement) == 0: + bb.warn("%s: The compile log indicates that host include and/or library paths were used.\n \ + Please check the log '%s' for more information." % (pkg, compilelog)) # Check the install log for host contamination installlog = os.path.join(logdir,"log.do_install") - statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog - if os.system(statement) == 0: - bb.warn("%s: The install log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \ - (pkg, installlog)) + if os.path.exists(installlog): + statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog + if os.system(statement) == 0: + bb.warn("%s: The install log indicates that host include and/or library paths were used.\n \ + Please check the log '%s' for more information." % (pkg, installlog)) # Scan the packages... pkgdest = d.getVar('PKGDEST', True) |