[OE-core] [PATCH 08/33] logging: update existing oe* logging users to the bb* interface

Saul Wold sgw at linux.intel.com
Tue May 3 23:44:31 UTC 2011


From: Darren Hart <dvhart at linux.intel.com>

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.

Signed-off-by: Darren Hart <dvhart at linux.intel.com>
---
 meta/classes/autotools.bbclass               |   16 ++++++++--------
 meta/classes/base.bbclass                    |    4 ++--
 meta/classes/distutils.bbclass               |    8 ++++----
 meta/classes/kernel.bbclass                  |    4 ++--
 meta/classes/qmake_base.bbclass              |   10 +++++-----
 meta/classes/scons.bbclass                   |    4 ++--
 meta/classes/sip.bbclass                     |    4 ++--
 meta/classes/sourcepkg.bbclass               |    4 ++--
 meta/classes/srec.bbclass                    |    2 +-
 meta/classes/utils.bbclass                   |   20 ++++++++++----------
 meta/recipes-core/dropbear/dropbear.inc      |    2 +-
 meta/recipes-core/eglibc/eglibc_2.12.bb      |    2 +-
 meta/recipes-core/glibc/glibc_2.10.1.bb      |    2 +-
 meta/recipes-devtools/python/python_2.6.6.bb |    2 +-
 14 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index cbd2e96..27f4a01 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -70,10 +70,10 @@ oe_runconf () {
 	if [ -x ${S}/configure ] ; then
 		cfgcmd="${S}/configure \
 		${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-		oenote "Running $cfgcmd..."
-		$cfgcmd || oefatal "oe_runconf failed" 
+		bbnote "Running $cfgcmd..."
+		$cfgcmd || bbfatal "oe_runconf failed" 
 	else
-		oefatal "no configure script found"
+		bbfatal "no configure script found"
 	fi
 }
 
@@ -132,7 +132,7 @@ autotools_do_configure() {
 			    if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
 			      : do nothing -- we still have an old unmodified configure.ac
 			    else
-			      oenote Executing glib-gettextize --force --copy
+			      bbnote Executing glib-gettextize --force --copy
 			      echo "no" | glib-gettextize --force --copy
 			    fi
 			  else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
@@ -142,11 +142,11 @@ autotools_do_configure() {
 			fi
 			mkdir -p m4
 			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
 			fi
-			oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
-			autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
+			bbnote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
+			autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || bbfatal "autoreconf execution failed."
 			cd $olddir
 		fi
 	;;
@@ -154,7 +154,7 @@ autotools_do_configure() {
 	if [ -e ${S}/configure ]; then
 		oe_runconf
 	else
-		oenote "nothing to configure"
+		bbnote "nothing to configure"
 	fi
 }
 
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index eafad7e..798593e 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -67,7 +67,7 @@ oedebug() {
 
 oe_runmake() {
 	if [ x"$MAKE" = x ]; then MAKE=make; fi
-	oenote ${MAKE} ${EXTRA_OEMAKE} "$@"
+	bbnote ${MAKE} ${EXTRA_OEMAKE} "$@"
 	${MAKE} ${EXTRA_OEMAKE} "$@" || die "oe_runmake failed"
 }
 
@@ -229,7 +229,7 @@ base_do_compile() {
 	if [ -e Makefile -o -e makefile ]; then
 		oe_runmake || die "make failed"
 	else
-		oenote "nothing to compile"
+		bbnote "nothing to compile"
 	fi
 }
 
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 7e6fbc0..79b962a 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -12,14 +12,14 @@ distutils_do_compile() {
          STAGING_LIBDIR=${STAGING_LIBDIR} \
          BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
          ${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() {
         install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${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() {
@@ -29,7 +29,7 @@ distutils_stage_all() {
         PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${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() {
@@ -39,7 +39,7 @@ distutils_do_install() {
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${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 \
             sed -i -e s:${D}::g $i
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index fd1c8e3..70a782f 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -84,7 +84,7 @@ do_compile_kernelmodules() {
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
 		oe_runmake modules  CC="${KERNEL_CC}" LD="${KERNEL_LD}"
 	else
-		oenote "no modules to compile"
+		bbnote "no modules to compile"
 	fi
 }
 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
 		oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
 	else
-		oenote "no modules to install"
+		bbnote "no modules to install"
 	fi
 
 	#
diff --git a/meta/classes/qmake_base.bbclass b/meta/classes/qmake_base.bbclass
index ea8903c..24a0f11 100644
--- a/meta/classes/qmake_base.bbclass
+++ b/meta/classes/qmake_base.bbclass
@@ -39,7 +39,7 @@ qmake_base_do_configure() {
 		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}/${TARGET_OS}-g++ $paths"
 
@@ -55,7 +55,7 @@ qmake_base_do_configure() {
 		;;
 	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 
 		PROFILES="`ls *.pro`"
@@ -70,15 +70,15 @@ qmake_base_do_configure() {
 	if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
 		AFTER="-after"
 		QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
-		oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
+		bbnote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
 	fi
 
 	if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
 		QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
-		oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
+		bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
 	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
 	${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
 }
diff --git a/meta/classes/scons.bbclass b/meta/classes/scons.bbclass
index 534b3bd..211746f 100644
--- a/meta/classes/scons.bbclass
+++ b/meta/classes/scons.bbclass
@@ -2,12 +2,12 @@ DEPENDS += "python-scons-native"
 
 scons_do_compile() {
         ${STAGING_BINDIR_NATIVE}/scons PREFIX=${prefix} prefix=${prefix} || \
-        oefatal "scons build execution failed."
+        bbfatal "scons build execution failed."
 }
 
 scons_do_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
diff --git a/meta/classes/sip.bbclass b/meta/classes/sip.bbclass
index a258fda..de0e2ef 100644
--- a/meta/classes/sip.bbclass
+++ b/meta/classes/sip.bbclass
@@ -17,7 +17,7 @@ sip_do_generate() {
 	if [ -z "$MODULES" ]; then
 		die "SIP_MODULES not set and no modules found in $PWD"
         else
-		oenote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'"
+		bbnote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'"
 	fi
 
 	if [ -z "${EXTRA_SIPTAGS}" ]; then
@@ -28,7 +28,7 @@ sip_do_generate() {
 
 	if [ ! -z "${SIP_FEATURES}" ]; then
 		FEATURES="-z ${SIP_FEATURES}"
-		oenote "sip feature file: ${SIP_FEATURES}"
+		bbnote "sip feature file: ${SIP_FEATURES}"
 	fi
 
 	for module in $MODULES
diff --git a/meta/classes/sourcepkg.bbclass b/meta/classes/sourcepkg.bbclass
index f12a195..64e6d7c 100644
--- a/meta/classes/sourcepkg.bbclass
+++ b/meta/classes/sourcepkg.bbclass
@@ -39,7 +39,7 @@ sourcepkg_do_create_orig_tgz(){
 	src_tree=${@get_src_tree(d)}
 	
 	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 -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
 	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
 	rm -rf $src_tree.orig
 }
diff --git a/meta/classes/srec.bbclass b/meta/classes/srec.bbclass
index a869a4f..390d5ab 100644
--- a/meta/classes/srec.bbclass
+++ b/meta/classes/srec.bbclass
@@ -14,7 +14,7 @@ do_srec[nostamp] = "1"
 
 do_srec () {
     if [ ${SREC_VMAADDR} = "" ] ; then
-       oefatal Cannot do_srec without SREC_VMAADDR defined.
+       bbfatal Cannot do_srec without SREC_VMAADDR defined.
     fi
     for type in ${IMAGE_FSTYPES}; do
         for skiptype in ${SREC_SKIP}; do
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index e923789..6bcaf86 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -91,7 +91,7 @@ oe_soinstall() {
 	#
 	# oe_
 	#
-	#oenote installing shared library $1 to $2
+	#bbnote installing shared library $1 to $2
 	#
 	libname=`basename $1`
 	install -m 755 $1 $2/$libname
@@ -129,7 +129,7 @@ oe_libinstall() {
 			require_shared=1
 			;;
 		-*)
-			oefatal "oe_libinstall: unknown option: $1"
+			bbfatal "oe_libinstall: unknown option: $1"
 			;;
 		*)
 			break;
@@ -142,7 +142,7 @@ oe_libinstall() {
 	shift
 	destpath="$1"
 	if [ -z "$destpath" ]; then
-		oefatal "oe_libinstall: no destination path specified"
+		bbfatal "oe_libinstall: no destination path specified"
 	fi
 	if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null
 	then
@@ -165,7 +165,7 @@ oe_libinstall() {
 	# Sanity check that the libname.lai is unique
 	number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l`
 	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
 
 
@@ -209,7 +209,7 @@ oe_libinstall() {
 		for f in $files; do
 			if [ ! -e "$f" ]; then
 				if [ -n "$libtool" ]; then
-					oefatal "oe_libinstall: $dir/$f not found."
+					bbfatal "oe_libinstall: $dir/$f not found."
 				fi
 			elif [ -L "$f" ]; then
 				__runcmd cp -P "$f" $destpath/
@@ -223,7 +223,7 @@ oe_libinstall() {
 
 	if [ -z "$libfile" ]; then
 		if  [ -n "$require_shared" ]; then
-			oefatal "oe_libinstall: unable to locate shared library"
+			bbfatal "oe_libinstall: unable to locate shared library"
 		fi
 	elif [ -z "$libtool" ]; then
 		# special case hack for non-libtool .so.#.#.# links
@@ -256,17 +256,17 @@ oe_machinstall() {
 
 	for o in `echo ${OVERRIDES} | tr ':' ' '`; do
 		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
 			return
 		fi
 	done
-#	oenote overrides specific file NOT present, trying default=$3...
+#	bbnote overrides specific file NOT present, trying default=$3...
 	if [ -e $3 ]; then
-		oenote $3 present, installing to $4
+		bbnote $3 present, installing to $4
 		install $1 $2 $3 $4
 	else
-		oenote $3 NOT present, touching empty $4
+		bbnote $3 NOT present, touching empty $4
 		touch $4
 	fi
 }
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index ab7719c..08be70e 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -34,7 +34,7 @@ DISTRO_TYPE = "${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)
 
 do_configure_prepend() {
 	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
 	fi
 }
diff --git a/meta/recipes-core/eglibc/eglibc_2.12.bb b/meta/recipes-core/eglibc/eglibc_2.12.bb
index c773af0..7598c61 100644
--- a/meta/recipes-core/eglibc/eglibc_2.12.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.12.bb
@@ -96,7 +96,7 @@ do_compile () {
 		cd ${S}/sunrpc/rpcsvc
 		for r in ${rpcsvc}; do
 			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
 	)
 }
diff --git a/meta/recipes-core/glibc/glibc_2.10.1.bb b/meta/recipes-core/glibc/glibc_2.10.1.bb
index 02d485e..33ebe24 100644
--- a/meta/recipes-core/glibc/glibc_2.10.1.bb
+++ b/meta/recipes-core/glibc/glibc_2.10.1.bb
@@ -149,7 +149,7 @@ do_compile () {
 		cd ${S}/sunrpc/rpcsvc
 		for r in ${rpcsvc}; do
 			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
 	)
 }
diff --git a/meta/recipes-devtools/python/python_2.6.6.bb b/meta/recipes-devtools/python/python_2.6.6.bb
index 3a0a056..a641ddd 100644
--- a/meta/recipes-devtools/python/python_2.6.6.bb
+++ b/meta/recipes-devtools/python/python_2.6.6.bb
@@ -31,7 +31,7 @@ TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
 TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
 
 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"
 }
 
 #
-- 
1.7.4.1





More information about the Openembedded-core mailing list