| Submitter | Saul Wold |
|---|---|
| Date | Sept. 18, 2012, 12:17 a.m. |
| Message ID | <1347927458-21623-1-git-send-email-sgw@linux.intel.com> |
| Download | mbox | patch |
| Permalink | /patch/36695/ |
| State | New |
| Headers | show |
Comments
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@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 > } > >
Patch
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 }
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(-)