diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2011-01-30 12:04:46 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-31 16:58:15 +0000 |
commit | 5b7e96d852778f1164198040cbd165241ea51e40 (patch) | |
tree | 15ba66b3f8d919f8411e73233c246482de5dba42 /meta/classes/package_ipk.bbclass | |
parent | 21f2dae46b481dbf34f6874ae814dcd23fc86d54 (diff) | |
download | poky-5b7e96d852778f1164198040cbd165241ea51e40.tar.gz |
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 <lianhao.lu@intel.com>
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
-rw-r--r-- | meta/classes/package_ipk.bbclass | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass index fdf326205b..ba768746ca 100644 --- a/meta/classes/package_ipk.bbclass +++ b/meta/classes/package_ipk.bbclass | |||
@@ -61,6 +61,26 @@ python package_ipk_install () { | |||
61 | raise bb.build.FuncFailed | 61 | raise bb.build.FuncFailed |
62 | } | 62 | } |
63 | 63 | ||
64 | ipk_log_check() { | ||
65 | target="$1" | ||
66 | lf_path="$2" | ||
67 | |||
68 | lf_txt="`cat $lf_path`" | ||
69 | for keyword_die in "exit 1" "Collected errors" ERR Fail | ||
70 | do | ||
71 | if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1 | ||
72 | then | ||
73 | echo "log_check: There were error messages in the logfile" | ||
74 | echo -e "log_check: Matched keyword: [$keyword_die]\n" | ||
75 | echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die" | ||
76 | echo "" | ||
77 | do_exit=1 | ||
78 | fi | ||
79 | done | ||
80 | test "$do_exit" = 1 && exit 1 | ||
81 | true | ||
82 | } | ||
83 | |||
64 | # | 84 | # |
65 | # Update the Packages index files in ${DEPLOY_DIR_IPK} | 85 | # Update the Packages index files in ${DEPLOY_DIR_IPK} |
66 | # | 86 | # |