From 5b7e96d852778f1164198040cbd165241ea51e40 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Sun, 30 Jan 2011 12:04:46 +0800 Subject: image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check(). Move function rootfs_xx_log_check() from rootfs_xx.bbclass to relevant package_xx.bbclass. (Where xx is rpm/ipk/deb). Signed-off-by: Lianhao Lu --- meta/classes/package_deb.bbclass | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'meta/classes/package_deb.bbclass') diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index 29dcc5c45..2181ce7c2 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass @@ -67,6 +67,26 @@ python do_package_deb_install () { os.putenv('PATH', path) } +deb_log_check() { + target="$1" + lf_path="$2" + + lf_txt="`cat $lf_path`" + for keyword_die in "E:" + do + if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 + then + echo "log_check: There were error messages in the logfile" + echo -e "log_check: Matched keyword: [$keyword_die]\n" + echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" + echo "" + do_exit=1 + fi + done + test "$do_exit" = 1 && exit 1 + true +} + python do_package_deb () { import re, copy import textwrap -- cgit v1.2.3