Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] rootfs_rpm: add multilib prefix to rpm installed package list
Date: Mon, 17 Sep 2012 17:17:37 -0700	[thread overview]
Message-ID: <1347927458-21623-1-git-send-email-sgw@linux.intel.com> (raw)

RPM does not name it's packages with the Multilib prefix, but the rootfs_rpm class
keeps track of the Multilib prefixs in a list. Use that list to re-attach the prefix
for use with the license bbclass, buildhistory bbclass will also use this and make
it more accurate between multilib and non-multilib.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/classes/rootfs_rpm.bbclass |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index c0207d8..ad83ffb 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -142,11 +142,18 @@ RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}" \
 
 list_installed_packages() {
 	if [ "$1" = "arch" ] ; then
-		${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]"
+		GET_LIST=$(${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]")
 	elif [ "$1" = "file" ] ; then
-		${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{PACKAGEORIGIN}\n]"
+		GET_LIST=$(${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{PACKAGEORIGIN}\n]")
 	else
-		${RPM_QUERY_CMD} -qa --qf "[%{NAME}\n]"
+		GET_LIST=$(${RPM_QUERY_CMD} -qa --qf "[%{NAME}\n]")
+	fi
+	if [ "x${MULTILIB_PREFIX_LIST}" = "x"]; then
+		echo "$GET_LIST"
+	else
+		for prefix in `echo ${MULTILIB_PREFIX_LIST}`; do
+			echo "$GET_LIST" | sed -e "s/^/$prefix\-/"
+		done
 	fi
 }
 
-- 
1.7.7.6




             reply	other threads:[~2012-09-18  0:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  0:17 Saul Wold [this message]
2012-09-18  0:17 ` [PATCH v2] xserver-xorg: Modify RREPLACES for RCONFLICTS Saul Wold
2012-09-18  2:40   ` Otavio Salvador
2012-09-18  4:17     ` Saul Wold
2012-09-18  4:18 ` [PATCH] rootfs_rpm: add multilib prefix to rpm installed package list Saul Wold

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=1347927458-21623-1-git-send-email-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