Skip to contentSkip to conversation

rootfs_rpm: add multilib prefix to rpm installed package list

PATCH In review Saul Wold 2 participants 5 messages Sep 18, 2012

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 rootfs_rpm: add multilib prefix to rpm installed package 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.

---
 meta/classes/rootfs_rpm.bbclass |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
meta/classes/rootfs_rpm.bbclass +10 -3
index c0207d8..ad83ffb 100644
@@ -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
 }
 
Signature · 1 line
1.7.7.6
author
#1 lore raw

PATCH v2 1/1 xserver-xorg: Modify RREPLACES for RCONFLICTS

---
 .../xorg-xserver/xserver-xorg-1.11.2.inc           |    2 +-
 .../recipes-graphics/xorg-xserver/xserver-xorg.inc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/xorg-xserver/xserver-xorg-1.11.2.inc +1 -1
index c71896a..35cb33a 100644
@@ -8,4 +8,4 @@ SRC_URI += "file://crosscompile.patch \
 SRC_URI[md5sum] = "8796fff441e5435ee36a72579008af24"
 SRC_URI[sha256sum] = "fa415decf02027ca278b06254ccfbcceba2a83c2741405257ebf749da4a73cf2"
 
-PR = "r7"
+PR = "r8"
meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +1 -1
index 210abad..643ca70 100644
@@ -66,7 +66,7 @@ PACKAGES =+ "${PN}-security-policy \
 
 RRECOMMENDS_${PN} += "${PN}-security-policy xkeyboard-config rgb xserver-xf86-config"
 RDEPENDS_${PN}-xvfb += "xkeyboard-config"
-RREPLACES_${PN}-module-exa = "${PN}"
+RCONFLICTS_${PN}-module-exa = "${PN} (<${PV})"
 
 FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/modules/*.so ${libdir}/xorg/modules/*.so /etc/X11 ${libdir}/xorg/protocol.txt ${datadir}/X11/xorg.conf.d"
 FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la"
Signature · 1 line
1.7.7.6
#2 lore raw

Re: [PATCH v2] xserver-xorg: Modify RREPLACES for RCONFLICTS

Hello Saul,

Quoted 1 line · Saul Wold

I understand the patch but from the description it is not clear why it is need. Please clarify it in the commit log.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
author
#3 lore raw

Re: [PATCH v2] xserver-xorg: Modify RREPLACES for RCONFLICTS

Quoted 8 lines · Otavio Salvador

Hello Saul,

Quoted 1 line · Saul Wold

I understand the patch but from the description it is not clear why it is need. Please clarify it in the commit log.

I might need Ross or Paul to help with that, I was just implementing and posting the solution based on other emails.

Sau!

author
#4 lore raw
In reply to Saul Wold
Quoted 5 lines · Saul Wold

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!

Quoted 32 lines
---
  meta/classes/rootfs_rpm.bbclass |   13 ++++++++++---
  1 files changed, 10 insertions(+), 3 deletions(-)
meta/classes/rootfs_rpm.bbclass +10 -3
index c0207d8..ad83ffb 100644
@@ -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
  }