[1/1] package_rpm.bbclass: Fix attemptonly install failures

Submitted by Mark Hatle on Aug. 17, 2012, 4:25 p.m.

Details

Message ID 8ec9fdfcc490a8777c7f1a88a262ba52f5efea4e.1345220525.git.mark.hatle@windriver.com
State Accepted
Commit 16d8d7fdda4ae7d108f5d50cde3f6104e231bd23
Headers show

Commit Message

Mark Hatle Aug. 17, 2012, 4:25 p.m.
During an attemptonly install, if you try to install two packages that
conflict with each other, a message is generated:

 error: Failed dependencies:
     dropbear conflicts with openssh-6.0p1-r4.ppc603e
     dropbear conflicts with openssh-sshd-6.0p1-r4.ppc603e

This is placed onto stderr (vs stdout), which was not being redirected.
This allowed the log-check code to find the magic key of "Failed" causing
the package installation process to fail.  Instead the proper behavior is to
simply ignore the error and proceed with the install.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/package_rpm.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b58ae85..4b18cc6 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -340,7 +340,7 @@  package_install_internal_rpm () {
 				-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
 				-D "__dbi_txn create nofsync private" \
 				-U --justdb --replacepkgs --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
-			$pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" || true
+			$pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1 || true
 		done
 	fi