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>
This commit is contained in:
parent
21f2dae46b
commit
5b7e96d852
|
@ -155,7 +155,6 @@ insert_feed_uris () {
|
|||
}
|
||||
|
||||
log_check() {
|
||||
set +x
|
||||
for target in $*
|
||||
do
|
||||
lf_path="${WORKDIR}/temp/log.do_$target.${PID}"
|
||||
|
@ -164,14 +163,12 @@ log_check() {
|
|||
|
||||
if test -e "$lf_path"
|
||||
then
|
||||
rootfs_${IMAGE_PKGTYPE}_log_check $target $lf_path
|
||||
${IMAGE_PKGTYPE}_log_check $target $lf_path
|
||||
else
|
||||
echo "Cannot find logfile [$lf_path]"
|
||||
fi
|
||||
echo "Logfile is clean"
|
||||
done
|
||||
|
||||
set -x
|
||||
}
|
||||
|
||||
# set '*' as the rootpassword so the images
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -61,6 +61,26 @@ python package_ipk_install () {
|
|||
raise bb.build.FuncFailed
|
||||
}
|
||||
|
||||
ipk_log_check() {
|
||||
target="$1"
|
||||
lf_path="$2"
|
||||
|
||||
lf_txt="`cat $lf_path`"
|
||||
for keyword_die in "exit 1" "Collected errors" ERR Fail
|
||||
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
|
||||
}
|
||||
|
||||
#
|
||||
# Update the Packages index files in ${DEPLOY_DIR_IPK}
|
||||
#
|
||||
|
|
|
@ -70,6 +70,26 @@ package_generate_rpm_conf () {
|
|||
printf "\n" >> ${DEPLOY_DIR_RPM}/solvedb.macro
|
||||
}
|
||||
|
||||
rpm_log_check() {
|
||||
target="$1"
|
||||
lf_path="$2"
|
||||
|
||||
lf_txt="`cat $lf_path`"
|
||||
for keyword_die in "Cannot find package" "exit 1" ERR Fail
|
||||
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 write_specfile () {
|
||||
import textwrap
|
||||
|
||||
|
|
|
@ -136,26 +136,6 @@ fakeroot rootfs_deb_do_rootfs () {
|
|||
log_check rootfs
|
||||
}
|
||||
|
||||
rootfs_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
|
||||
}
|
||||
|
||||
remove_packaging_data_files() {
|
||||
rm -rf ${IMAGE_ROOTFS}${opkglibdir}
|
||||
rm -rf ${IMAGE_ROOTFS}/usr/dpkg/
|
||||
|
|
|
@ -82,26 +82,6 @@ fakeroot rootfs_ipk_do_rootfs () {
|
|||
log_check rootfs
|
||||
}
|
||||
|
||||
rootfs_ipk_log_check() {
|
||||
target="$1"
|
||||
lf_path="$2"
|
||||
|
||||
lf_txt="`cat $lf_path`"
|
||||
for keyword_die in "exit 1" "Collected errors" ERR Fail
|
||||
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
|
||||
}
|
||||
|
||||
rootfs_ipk_write_manifest() {
|
||||
manifest=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest
|
||||
cp ${IMAGE_ROOTFS}${opkglibdir}/status $manifest
|
||||
|
|
|
@ -231,26 +231,6 @@ EOF
|
|||
fi
|
||||
}
|
||||
|
||||
rootfs_rpm_log_check() {
|
||||
target="$1"
|
||||
lf_path="$2"
|
||||
|
||||
lf_txt="`cat $lf_path`"
|
||||
for keyword_die in "Cannot find package" "exit 1" ERR Fail
|
||||
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
|
||||
}
|
||||
|
||||
remove_packaging_data_files() {
|
||||
rm -rf ${IMAGE_ROOTFS}${rpmlibdir}
|
||||
rm -rf ${IMAGE_ROOTFS}${opkglibdir}
|
||||
|
|
Loading…
Reference in New Issue