summaryrefslogtreecommitdiff
path: root/meta/classes/rootfs_rpm.bbclass
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2012-09-19 09:47:06 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-19 18:12:50 +0100
commitf72abd80b0cc9d27aad2e31ecb548b4ab0fd8f67 (patch)
treea5f35bafba3a811d8314853599516d505fd724bb /meta/classes/rootfs_rpm.bbclass
parentf06097f4581e4c728c2950a86e025384e4bdcdf0 (diff)
downloadopenembedded-core-f72abd80b0cc9d27aad2e31ecb548b4ab0fd8f67.tar.gz
openembedded-core-f72abd80b0cc9d27aad2e31ecb548b4ab0fd8f67.tar.bz2
openembedded-core-f72abd80b0cc9d27aad2e31ecb548b4ab0fd8f67.zip
rootfs_rpm: Add Multilib prefix to installed_packages list
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. Use the embedded "Platform" information to ensure we get all the correct matching. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs_rpm.bbclass')
-rw-r--r--meta/classes/rootfs_rpm.bbclass19
1 files changed, 14 insertions, 5 deletions
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index c0207d8629..d95ccfad2b 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -141,12 +141,21 @@ RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}" \
-D "__dbi_txn create nofsync private"'
list_installed_packages() {
+ GET_LIST=$(${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN} %{Platform}\n]")
+
+ # Use awk to find the multilib prefix and compare it
+ # with the platform RPM thinks it is part of
+ for prefix in `echo ${MULTILIB_PREFIX_LIST}`; do
+ GET_LIST=$(echo "$GET_LIST" | awk -v prefix="$prefix" '$0 ~ prefix {printf("%s-%s\n", prefix, $0); } $0 !~ prefix {print $0}')
+ done
+
+ # print the info, need to different return counts
if [ "$1" = "arch" ] ; then
- ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]"
- elif [ "$1" = "file" ] ; then
- ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{PACKAGEORIGIN}\n]"
- else
- ${RPM_QUERY_CMD} -qa --qf "[%{NAME}\n]"
+ echo "$GET_LIST" | awk '{print $1, $2}'
+ elif [ "$1" = "file" ] ; then
+ echo "$GET_LIST" | awk '{print $1, $3}'
+ else
+ echo "$GET_LIST" | awk '{print $1}'
fi
}