logging: update existing oe* logging users to the bb* interface

The new bash logging class provides bbnote, bbwarn, bbfatal, and bbdebug
replacements (as well as bbplain and bberror) for the oe* equivalents. Use the
new bb* API in preparation to delete the oe* logging API.

This patch was automatically generated by a sed script. The result has been
visually inspected and used to build core-image-sato for qemux86.

(From OE-Core rev: a1f09fce5caba389d0484b169f0cde85d64514fa)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Darren Hart 2011-04-28 21:49:31 -07:00 committed by Richard Purdie
parent 0e2eb05f46
commit fc934af7c8
14 changed files with 42 additions and 42 deletions

View File

@ -70,10 +70,10 @@ oe_runconf () {
if [ -x ${S}/configure ] ; then if [ -x ${S}/configure ] ; then
cfgcmd="${S}/configure \ cfgcmd="${S}/configure \
${CONFIGUREOPTS} ${EXTRA_OECONF} $@" ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
oenote "Running $cfgcmd..." bbnote "Running $cfgcmd..."
$cfgcmd || oefatal "oe_runconf failed" $cfgcmd || bbfatal "oe_runconf failed"
else else
oefatal "no configure script found" bbfatal "no configure script found"
fi fi
} }
@ -132,7 +132,7 @@ autotools_do_configure() {
if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
: do nothing -- we still have an old unmodified configure.ac : do nothing -- we still have an old unmodified configure.ac
else else
oenote Executing glib-gettextize --force --copy bbnote Executing glib-gettextize --force --copy
echo "no" | glib-gettextize --force --copy echo "no" | glib-gettextize --force --copy
fi fi
else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
@ -142,11 +142,11 @@ autotools_do_configure() {
fi fi
mkdir -p m4 mkdir -p m4
if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
oenote Executing intltoolize --copy --force --automake bbnote Executing intltoolize --copy --force --automake
intltoolize --copy --force --automake intltoolize --copy --force --automake
fi fi
oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths bbnote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed." autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed."
cd $olddir cd $olddir
fi fi
;; ;;
@ -154,7 +154,7 @@ autotools_do_configure() {
if [ -e ${S}/configure ]; then if [ -e ${S}/configure ]; then
oe_runconf oe_runconf
else else
oenote "nothing to configure" bbnote "nothing to configure"
fi fi
} }

View File

@ -67,7 +67,7 @@ oedebug() {
oe_runmake() { oe_runmake() {
if [ x"$MAKE" = x ]; then MAKE=make; fi if [ x"$MAKE" = x ]; then MAKE=make; fi
oenote ${MAKE} ${EXTRA_OEMAKE} "$@" bbnote ${MAKE} ${EXTRA_OEMAKE} "$@"
${MAKE} ${EXTRA_OEMAKE} "$@" || die "oe_runmake failed" ${MAKE} ${EXTRA_OEMAKE} "$@" || die "oe_runmake failed"
} }
@ -231,7 +231,7 @@ base_do_compile() {
if [ -e Makefile -o -e makefile ]; then if [ -e Makefile -o -e makefile ]; then
oe_runmake || die "make failed" oe_runmake || die "make failed"
else else
oenote "nothing to compile" bbnote "nothing to compile"
fi fi
} }

View File

@ -12,14 +12,14 @@ distutils_do_compile() {
STAGING_LIBDIR=${STAGING_LIBDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py build ${DISTUTILS_BUILD_ARGS} || \ ${STAGING_BINDIR_NATIVE}/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
oefatal "python setup.py build_ext execution failed." bbfatal "python setup.py build_ext execution failed."
} }
distutils_stage_headers() { distutils_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ ${STAGING_BINDIR_NATIVE}/python setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
oefatal "python setup.py install_headers execution failed." bbfatal "python setup.py install_headers execution failed."
} }
distutils_stage_all() { distutils_stage_all() {
@ -29,7 +29,7 @@ distutils_stage_all() {
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ ${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
oefatal "python setup.py install (stage) execution failed." bbfatal "python setup.py install (stage) execution failed."
} }
distutils_do_install() { distutils_do_install() {
@ -39,7 +39,7 @@ distutils_do_install() {
PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \ PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \ ${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
oefatal "python setup.py install execution failed." bbfatal "python setup.py install execution failed."
for i in `find ${D} -name "*.py"` ; do \ for i in `find ${D} -name "*.py"` ; do \
sed -i -e s:${D}::g $i sed -i -e s:${D}::g $i

View File

@ -84,7 +84,7 @@ do_compile_kernelmodules() {
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
else else
oenote "no modules to compile" bbnote "no modules to compile"
fi fi
} }
addtask compile_kernelmodules after do_compile before do_install addtask compile_kernelmodules after do_compile before do_install
@ -97,7 +97,7 @@ kernel_do_install() {
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
else else
oenote "no modules to install" bbnote "no modules to install"
fi fi
# #

View File

@ -39,7 +39,7 @@ qmake_base_do_configure() {
die Unsupported target ${TARGET_OS} for oe-g++ qmake spec die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
;; ;;
*) *)
oenote Searching for qmake spec file bbnote Searching for qmake spec file
paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++" paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths" paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
@ -55,7 +55,7 @@ qmake_base_do_configure() {
;; ;;
esac esac
oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'" bbnote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
if [ -z "${QMAKE_PROFILES}" ]; then if [ -z "${QMAKE_PROFILES}" ]; then
PROFILES="`ls *.pro`" PROFILES="`ls *.pro`"
@ -70,15 +70,15 @@ qmake_base_do_configure() {
if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
AFTER="-after" AFTER="-after"
QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}" QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}" bbnote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
fi fi
if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}" QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}" bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
fi fi
#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" #bbnote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
unset QMAKESPEC || true unset QMAKESPEC || true
${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES" ${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
} }

View File

@ -2,12 +2,12 @@ DEPENDS += "python-scons-native"
scons_do_compile() { scons_do_compile() {
${STAGING_BINDIR_NATIVE}/scons PREFIX=${prefix} prefix=${prefix} || \ ${STAGING_BINDIR_NATIVE}/scons PREFIX=${prefix} prefix=${prefix} || \
oefatal "scons build execution failed." bbfatal "scons build execution failed."
} }
scons_do_install() { scons_do_install() {
${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} prefix=${D}${prefix} install || \ ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} prefix=${D}${prefix} install || \
oefatal "scons install execution failed." bbfatal "scons install execution failed."
} }
EXPORT_FUNCTIONS do_compile do_install EXPORT_FUNCTIONS do_compile do_install

View File

@ -17,7 +17,7 @@ sip_do_generate() {
if [ -z "$MODULES" ]; then if [ -z "$MODULES" ]; then
die "SIP_MODULES not set and no modules found in $PWD" die "SIP_MODULES not set and no modules found in $PWD"
else else
oenote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'" bbnote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'"
fi fi
if [ -z "${EXTRA_SIPTAGS}" ]; then if [ -z "${EXTRA_SIPTAGS}" ]; then
@ -28,7 +28,7 @@ sip_do_generate() {
if [ ! -z "${SIP_FEATURES}" ]; then if [ ! -z "${SIP_FEATURES}" ]; then
FEATURES="-z ${SIP_FEATURES}" FEATURES="-z ${SIP_FEATURES}"
oenote "sip feature file: ${SIP_FEATURES}" bbnote "sip feature file: ${SIP_FEATURES}"
fi fi
for module in $MODULES for module in $MODULES

View File

@ -39,7 +39,7 @@ sourcepkg_do_create_orig_tgz(){
src_tree=${@get_src_tree(d)} src_tree=${@get_src_tree(d)}
echo $src_tree echo $src_tree
oenote "Creating .orig.tar.gz in ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz" bbnote "Creating .orig.tar.gz in ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz"
tar cvzf ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz --exclude-from temp/exclude-from-file $src_tree tar cvzf ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz --exclude-from temp/exclude-from-file $src_tree
tar -cf - -C $src_tree -ps . | tar -xf - -C $src_tree.orig tar -cf - -C $src_tree -ps . | tar -xf - -C $src_tree.orig
} }
@ -93,7 +93,7 @@ sourcepkg_do_create_diff_gz(){
cp $i $src_tree/${DISTRO}/files cp $i $src_tree/${DISTRO}/files
done done
oenote "Creating .diff.gz in ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz" bbnote "Creating .diff.gz in ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz"
LC_ALL=C TZ=UTC0 diff --exclude-from=temp/exclude-from-file -Naur $src_tree.orig $src_tree | gzip -c > ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz LC_ALL=C TZ=UTC0 diff --exclude-from=temp/exclude-from-file -Naur $src_tree.orig $src_tree | gzip -c > ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz
rm -rf $src_tree.orig rm -rf $src_tree.orig
} }

View File

@ -14,7 +14,7 @@ do_srec[nostamp] = "1"
do_srec () { do_srec () {
if [ ${SREC_VMAADDR} = "" ] ; then if [ ${SREC_VMAADDR} = "" ] ; then
oefatal Cannot do_srec without SREC_VMAADDR defined. bbfatal Cannot do_srec without SREC_VMAADDR defined.
fi fi
for type in ${IMAGE_FSTYPES}; do for type in ${IMAGE_FSTYPES}; do
for skiptype in ${SREC_SKIP}; do for skiptype in ${SREC_SKIP}; do

View File

@ -91,7 +91,7 @@ oe_soinstall() {
# #
# oe_ # oe_
# #
#oenote installing shared library $1 to $2 #bbnote installing shared library $1 to $2
# #
libname=`basename $1` libname=`basename $1`
install -m 755 $1 $2/$libname install -m 755 $1 $2/$libname
@ -129,7 +129,7 @@ oe_libinstall() {
require_shared=1 require_shared=1
;; ;;
-*) -*)
oefatal "oe_libinstall: unknown option: $1" bbfatal "oe_libinstall: unknown option: $1"
;; ;;
*) *)
break; break;
@ -142,7 +142,7 @@ oe_libinstall() {
shift shift
destpath="$1" destpath="$1"
if [ -z "$destpath" ]; then if [ -z "$destpath" ]; then
oefatal "oe_libinstall: no destination path specified" bbfatal "oe_libinstall: no destination path specified"
fi fi
if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null
then then
@ -165,7 +165,7 @@ oe_libinstall() {
# Sanity check that the libname.lai is unique # Sanity check that the libname.lai is unique
number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l` number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l`
if [ $number_of_files -gt 1 ]; then if [ $number_of_files -gt 1 ]; then
oefatal "oe_libinstall: $dotlai is not unique in $dir" bbfatal "oe_libinstall: $dotlai is not unique in $dir"
fi fi
@ -209,7 +209,7 @@ oe_libinstall() {
for f in $files; do for f in $files; do
if [ ! -e "$f" ]; then if [ ! -e "$f" ]; then
if [ -n "$libtool" ]; then if [ -n "$libtool" ]; then
oefatal "oe_libinstall: $dir/$f not found." bbfatal "oe_libinstall: $dir/$f not found."
fi fi
elif [ -L "$f" ]; then elif [ -L "$f" ]; then
__runcmd cp -P "$f" $destpath/ __runcmd cp -P "$f" $destpath/
@ -223,7 +223,7 @@ oe_libinstall() {
if [ -z "$libfile" ]; then if [ -z "$libfile" ]; then
if [ -n "$require_shared" ]; then if [ -n "$require_shared" ]; then
oefatal "oe_libinstall: unable to locate shared library" bbfatal "oe_libinstall: unable to locate shared library"
fi fi
elif [ -z "$libtool" ]; then elif [ -z "$libtool" ]; then
# special case hack for non-libtool .so.#.#.# links # special case hack for non-libtool .so.#.#.# links
@ -256,17 +256,17 @@ oe_machinstall() {
for o in `echo ${OVERRIDES} | tr ':' ' '`; do for o in `echo ${OVERRIDES} | tr ':' ' '`; do
if [ -e $dirname/$o/$filename ]; then if [ -e $dirname/$o/$filename ]; then
oenote $dirname/$o/$filename present, installing to $4 bbnote $dirname/$o/$filename present, installing to $4
install $1 $2 $dirname/$o/$filename $4 install $1 $2 $dirname/$o/$filename $4
return return
fi fi
done done
# oenote overrides specific file NOT present, trying default=$3... # bbnote overrides specific file NOT present, trying default=$3...
if [ -e $3 ]; then if [ -e $3 ]; then
oenote $3 present, installing to $4 bbnote $3 present, installing to $4
install $1 $2 $3 $4 install $1 $2 $3 $4
else else
oenote $3 NOT present, touching empty $4 bbnote $3 NOT present, touching empty $4
touch $4 touch $4
fi fi
} }

View File

@ -34,7 +34,7 @@ DISTRO_TYPE = "${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)
do_configure_prepend() { do_configure_prepend() {
if [ "x${DISTRO}" != "xfamiliar" -a "${DISTRO_TYPE}" = "debug" ]; then if [ "x${DISTRO}" != "xfamiliar" -a "${DISTRO_TYPE}" = "debug" ]; then
oenote "WARNING: applying allow-nopw.patch which allows password-less logins!" bbnote "WARNING: applying allow-nopw.patch which allows password-less logins!"
patch -p1 < ${WORKDIR}/allow-nopw.patch patch -p1 < ${WORKDIR}/allow-nopw.patch
fi fi
} }

View File

@ -96,7 +96,7 @@ do_compile () {
cd ${S}/sunrpc/rpcsvc cd ${S}/sunrpc/rpcsvc
for r in ${rpcsvc}; do for r in ${rpcsvc}; do
h=`echo $r|sed -e's,\.x$,.h,'` h=`echo $r|sed -e's,\.x$,.h,'`
rpcgen -h $r -o $h || oewarn "unable to generate header for $r" rpcgen -h $r -o $h || bbwarn "unable to generate header for $r"
done done
) )
} }

View File

@ -149,7 +149,7 @@ do_compile () {
cd ${S}/sunrpc/rpcsvc cd ${S}/sunrpc/rpcsvc
for r in ${rpcsvc}; do for r in ${rpcsvc}; do
h=`echo $r|sed -e's,\.x$,.h,'` h=`echo $r|sed -e's,\.x$,.h,'`
rpcgen -h $r -o $h || oewarn "unable to generate header for $r" rpcgen -h $r -o $h || bbwarn "unable to generate header for $r"
done done
) )
} }

View File

@ -31,7 +31,7 @@ TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
do_configure_prepend() { do_configure_prepend() {
autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || oenote "_ctypes failed to autoreconf" autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
} }
# #