[OE-core] [PATCH] rootfs_rpm: add multilib prefix to rpm installed package list
Saul Wold
sgw at linux.intel.com
Tue Sep 18 04:18:54 UTC 2012
On 09/17/2012 05:17 PM, Saul Wold wrote:
> 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.
>
Further testing showed my partial lack of understanding around multilib,
this is now too aggressive in adding the prefix. It looks like I need
to use the information in the rpm query result to correctly decode the
multilib prefix and append that, expect a V2 tomorrow.
Sau!
> Signed-off-by: Saul Wold <sgw at 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
> }
>
>
More information about the Openembedded-core
mailing list