summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-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}" \
141 -D "__dbi_txn create nofsync private"' 141 -D "__dbi_txn create nofsync private"'
142 142
143list_installed_packages() { 143list_installed_packages() {
144 GET_LIST=$(${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN} %{Platform}\n]")
145
146 # Use awk to find the multilib prefix and compare it
147 # with the platform RPM thinks it is part of
148 for prefix in `echo ${MULTILIB_PREFIX_LIST}`; do
149 GET_LIST=$(echo "$GET_LIST" | awk -v prefix="$prefix" '$0 ~ prefix {printf("%s-%s\n", prefix, $0); } $0 !~ prefix {print $0}')
150 done
151
152 # print the info, need to different return counts
144 if [ "$1" = "arch" ] ; then 153 if [ "$1" = "arch" ] ; then
145 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" 154 echo "$GET_LIST" | awk '{print $1, $2}'
146 elif [ "$1" = "file" ] ; then 155 elif [ "$1" = "file" ] ; then
147 ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{PACKAGEORIGIN}\n]" 156 echo "$GET_LIST" | awk '{print $1, $3}'
148 else 157 else
149 ${RPM_QUERY_CMD} -qa --qf "[%{NAME}\n]" 158 echo "$GET_LIST" | awk '{print $1}'
150 fi 159 fi
151} 160}
152 161