Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [CONSOLIDATED PULL 05/17] Fix manual log file paths
Date: Tue,  3 Jul 2012 00:09:34 -0700	[thread overview]
Message-ID: <779db325d407f0bade84572ef99fdad4d0c88011.1341299168.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1341299168.git.sgw@linux.intel.com>
In-Reply-To: <cover.1341299168.git.sgw@linux.intel.com>

From: Mark Hatle <mark.hatle@windriver.com>

When a recent change, the path to log files may be contained within an
arbitrary directory.  To generate the manual log files in the correct path
we should be using the ${BB_LOGFILE}'s path instead of always assuming the
logs go into ${WORKDIR}/temp.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/image.bbclass        |    2 +-
 meta/classes/package_deb.bbclass  |    4 ++--
 meta/classes/package_ipk.bbclass  |    2 +-
 meta/classes/package_rpm.bbclass  |   10 +++++-----
 meta/classes/populate_sdk.bbclass |    2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 7e4bb69..9fae1fe 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -220,7 +220,7 @@ insert_feed_uris () {
 log_check() {
 	for target in $*
 	do
-		lf_path="${WORKDIR}/temp/log.do_$target.${PID}"
+		lf_path="`dirname ${BB_LOGFILE}`/log.do_$target.${PID}"
 		
 		echo "log_check: Using $lf_path as logfile"
 		
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 0a8dc1b..f58fd2b 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -167,10 +167,10 @@ package_install_internal_deb () {
 		fi
 	done
 
-	rm -f ${WORKDIR}/temp/log.do_${task}-attemptonly.${PID}
+	rm -f `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID}
 	if [ ! -z "${package_attemptonly}" ]; then
 		for i in ${package_attemptonly}; do
-			apt-get install $i --force-yes --allow-unauthenticated >> ${WORKDIR}/temp/log.do_${task}-attemptonly.${PID} 2>&1 || true
+			apt-get install $i --force-yes --allow-unauthenticated >> `dirname ${BB_LOGFILE}`/log.do_${task}-attemptonly.${PID} 2>&1 || true
 		done
 	fi
 
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index c86ea03..e682e6a 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -157,7 +157,7 @@ package_install_internal_ipk() {
 	fi
 
 	if [ ! -z "${package_attemptonly}" ]; then
-		opkg-cl ${ipkg_args} install ${package_attemptonly} > "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}" || true
+		opkg-cl ${ipkg_args} install ${package_attemptonly} > "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" || true
 	fi
 
 	package_tryout_install_multilib_ipk
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 5559a46..78279f5 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -342,14 +342,14 @@ package_install_internal_rpm () {
 				echo "Note: Unable to find package $pkg ($ml_pkg) -- PACKAGE_INSTALL_ATTEMPTONLY"
 				continue
 			fi
-			echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}"
+			echo "Attempting $pkg_name..." >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}"
 			${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 				--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
 				--root "${target_rootfs}/install" \
 				-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
 				-D "__dbi_txn create nofsync private" \
 				-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
-			$pkg_name >> "${WORKDIR}/temp/log.do_${task}_attemptonly.${PID}" || true
+			$pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" || true
 		done
 	fi
 
@@ -390,17 +390,17 @@ package_install_internal_rpm () {
 
 			if [ $found -eq 0 ]; then
 				echo "Note: Unable to find package $pkg -- suggests"
-				echo "Unable to find package $pkg." >> "${WORKDIR}/temp/log.do_${task}_recommend.${PID}"
+				echo "Unable to find package $pkg." >> "`dirname ${BB_LOGFILE}`/log.do_${task}_recommend.${PID}"
 				continue
 			fi
-			echo "Attempting $pkg_name..." >> "${WORKDIR}/temp/log.do_{task}_recommend.${PID}"
+			echo "Attempting $pkg_name..." >> "`dirname ${BB_LOGFILE}`/log.do_{task}_recommend.${PID}"
 			${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
 				--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
 				--root "${target_rootfs}/install" \
 				-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
 				-D "__dbi_txn create nofsync private" \
 				-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
-				$pkg_name >> "${WORKDIR}/temp/log.do_${task}_recommend.${PID}" 2>&1 || true
+				$pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_recommend.${PID}" 2>&1 || true
 		done
 		cat ${target_rootfs}/install/recommend.list ${target_rootfs}/install/recommend.new | sort -u > ${target_rootfs}/install/recommend.new.list
 		mv -f ${target_rootfs}/install/recommend.new.list ${target_rootfs}/install/recommend.list
diff --git a/meta/classes/populate_sdk.bbclass b/meta/classes/populate_sdk.bbclass
index 5aa8e92..1131d68 100644
--- a/meta/classes/populate_sdk.bbclass
+++ b/meta/classes/populate_sdk.bbclass
@@ -70,7 +70,7 @@ fakeroot do_populate_sdk() {
 populate_sdk_log_check() {
 	for target in $*
 	do
-		lf_path="${WORKDIR}/temp/log.do_$target.${PID}"
+		lf_path="`dirname ${BB_LOGFILE}`/log.do_$target.${PID}"
 
 		echo "log_check: Using $lf_path as logfile"
 
-- 
1.7.7.6




  parent reply	other threads:[~2012-07-03  7:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03  7:09 [CONSOLIDATED PULL 00/17] SDK Fixes and other Patches Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 01/17] kconfig-frontends: New recipe Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 02/17] icu 3.6: do_install failed: Segmentation fault Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 03/17] linux-yocto-custom: Remove linux-tools Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 04/17] core-image*sdk: Add kernel-dev to sdk images Saul Wold
2012-07-03  7:09 ` Saul Wold [this message]
2012-07-03  7:09 ` [CONSOLIDATED PULL 06/17] populate_sdk.bbclass: Split into two parts Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 07/17] populate_sdk: Allow for attempt only packages in the SDK Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 08/17] populate_sdk_base.bbclass: Change to using task specific depends Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 09/17] populate_sdk: enable basic multilib support Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 10/17] u-boot: Don't make the -Os removal part of global settings Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 11/17] u-boot: do not clobber PARALLEL_MAKE setting Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 12/17] autotools.bbclass: When configure fails, dump the config.log files the logs Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 13/17] libc-common: Allow -dbg package to append, and not just set package variables Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 14/17] package.bbclass: Allow a package to skip per file dependency generation Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 15/17] image.bbclass: Add support to build the SDK in parallel with the image Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 16/17] base.bbclass: Add cross-canadian-${TRANSLATED_TARGET_ARCH} to the license exclusion list Saul Wold
2012-07-03  7:09 ` [CONSOLIDATED PULL 17/17] openjade-native: fix undefined Getopts error, use std namespace Saul Wold
2012-07-03 12:59   ` Martin Jansa
2012-07-03 14:55 ` [CONSOLIDATED PULL 00/17] SDK Fixes and other Patches Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=779db325d407f0bade84572ef99fdad4d0c88011.1341299168.git.sgw@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox