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:47:06 +0000 |
commit | 54d61ed9f759a38f7309f4428e1853249071667c (patch) | |
tree | cfb50dc609051acd168f95b4c86addbbaf915983 | |
parent | 58ce5121e1ca177d16e86f0b6633e0b46658a2ff (diff) | |
download | poky-54d61ed9f759a38f7309f4428e1853249071667c.tar.gz |
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]
(From OE-Core rev: bbf38aa898454a2bb9a4ac993eb2696fbd5f4e57)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 () { | |||
612 | # Check the compile log for host contamination | 612 | # Check the compile log for host contamination |
613 | compilelog = os.path.join(logdir,"log.do_compile") | 613 | compilelog = os.path.join(logdir,"log.do_compile") |
614 | 614 | ||
615 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog | 615 | if os.path.exists(compilelog): |
616 | if os.system(statement) == 0: | 616 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog |
617 | bb.warn("%s: The compile log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \ | 617 | if os.system(statement) == 0: |
618 | (pkg, compilelog)) | 618 | bb.warn("%s: The compile log indicates that host include and/or library paths were used.\n \ |
619 | 619 | Please check the log '%s' for more information." % (pkg, compilelog)) | |
620 | 620 | ||
621 | # Check the install log for host contamination | 621 | # Check the install log for host contamination |
622 | installlog = os.path.join(logdir,"log.do_install") | 622 | installlog = os.path.join(logdir,"log.do_install") |
623 | 623 | ||
624 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog | 624 | if os.path.exists(installlog): |
625 | if os.system(statement) == 0: | 625 | statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog |
626 | bb.warn("%s: The install log indicates that host include and/or library paths were used. Please check the log '%s' for more information." % \ | 626 | if os.system(statement) == 0: |
627 | (pkg, installlog)) | 627 | bb.warn("%s: The install log indicates that host include and/or library paths were used.\n \ |
628 | Please check the log '%s' for more information." % (pkg, installlog)) | ||
628 | 629 | ||
629 | # Scan the packages... | 630 | # Scan the packages... |
630 | pkgdest = d.getVar('PKGDEST', True) | 631 | pkgdest = d.getVar('PKGDEST', True) |