package_rpm.bbclass: fix the arch (replace "-" with "_")
cover package_rpm.bbclass: fix the arch (replace "-" with "_")
Test info:
MACHINE = beagleboard/mpc8315e-rdb/qemux86PACKAGE_CLASSES = package_rpm
$ bitbake core-image-minimal core-image-sato meta-toolchain \ meta-toolchain-sdk adt-installer meta-ide-support
$ bitbake package-index
$ runqemu qemux86 (when MACHINE=qemux86)
All of them are OK.
Note:
The nativesdk's arch would be x86_64_nativesdk or i686_nativesdk (it was x86_64 or i686 in the past) when use rpm, I have tested as much as I can, but I'm not sure whether I have missed anything which minds this.
// Robert
The following changes since commit b4c5725af4cd85d5644f0373e2674e903c4eab2b:
yocto-bsp: add missing xserver-xf86-config .bbappend for qemu (2012-08-25 14:47:07 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/rpmarch
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rpmarch
Robert Yang (1):
package_rpm.bbclass: fix the arch (replace "-" with "_")
meta/classes/package_rpm.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.11.2
PATCH 1/1 package_rpm.bbclass: fix the arch (replace "-" with "_")
rpm can't use the "-" as the arch, which causes problem, e.g., when MACHINE = "beagleboard":
* The arch should be armv7a-vfp-neon, but rpm only takes the armv7a, this is incorrect since it is mixed with real arch armv7a.
* The nativesdk's arch should be i686-nativesdk (or x86_64-nativesdk), but rpm only takes the i686 (or x86_64), this in incorrect since it is mixed with the arch i686 (or x86_64).
Replace "-" with "_" when rpm package and the rootfs generation would fix the problem, I think this is fine since it doesn't change the tune's arch, the package manager doesn't care about the arch's name, but it needs a unify arch system to avoid confusing. This is similar to what we have done on the deb which fixed the arch i486, i586 and so on to i386.
[YOCTO #2328]
--- meta/classes/package_rpm.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes/package_rpm.bbclass +4 -4
@@ -27,12 +27,12 @@ package_update_index_rpm () { fi # Update target packages - base_archs="${PACKAGE_ARCHS}" - ml_archs="${MULTILIB_PACKAGE_ARCHS}" + base_archs="`echo ${PACKAGE_ARCHS} | sed 's/-/_/g'`" + ml_archs="`echo ${MULTILIB_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_TARGET_BASE}" base_archs ml_archs # Update SDK packages - base_archs="${SDK_PACKAGE_ARCHS}" + base_archs="`echo ${SDK_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_HOST_BASE}" base_archs }
@@ -1118,7 +1118,7 @@ python do_package_rpm () { rpmbuild = d.getVar('RPMBUILD', True) targetsys = d.getVar('TARGET_SYS', True) targetvendor = d.getVar('TARGET_VENDOR', True) - package_arch = d.getVar('PACKAGE_ARCH', True) or "" + package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") if package_arch not in "all any noarch".split(): ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
Signature · 1 line
1.7.11.2
I've looked at the patch and it looks find to me.
One note, however.. Whatever arch fields we use need to also match the fields that get encoded into Zypper and the sat-solver stuff.. So there may be a second chunk of code that needs to be updated to match.
--Mark
Quoted 53 lines · Robert Yang
rpm can't use the "-" as the arch, which causes problem, e.g., when MACHINE = "beagleboard":
* The arch should be armv7a-vfp-neon, but rpm only takes the armv7a, this is incorrect since it is mixed with real arch armv7a.
* The nativesdk's arch should be i686-nativesdk (or x86_64-nativesdk), but rpm only takes the i686 (or
x86_64), this in incorrect since it is mixed with the arch i686 (orx86_64).Replace "-" with "_" when rpm package and the rootfs generation would fix the problem, I think this is fine since it doesn't change the tune's arch, the package manager doesn't care about the arch's name, but it needs a unify arch system to avoid confusing. This is similar to what we have done on the deb which fixed the arch i486, i586 and so on to i386.
[YOCTO #2328]
Signed-off-by Robert Yang <[email protected]>--- meta/classes/package_rpm.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)meta/classes/package_rpm.bbclass +4
-4@@ -27,12 +27,12 @@ package_update_index_rpm () { fi # Update target packages - base_archs="${PACKAGE_ARCHS}" - ml_archs="${MULTILIB_PACKAGE_ARCHS}" + base_archs="`echo ${PACKAGE_ARCHS} | sed 's/-/_/g'`" + ml_archs="`echo ${MULTILIB_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_TARGET_BASE}" base_archs ml_archs # Update SDK packages - base_archs="${SDK_PACKAGE_ARCHS}" + base_archs="`echo ${SDK_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_HOST_BASE}" base_archs }@@ -1118,7 +1118,7 @@ python do_package_rpm () { rpmbuild = d.getVar('RPMBUILD', True) targetsys = d.getVar('TARGET_SYS', True) targetvendor = d.getVar('TARGET_VENDOR', True) - package_arch = d.getVar('PACKAGE_ARCH', True) or "" + package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") if package_arch not in "all any noarch".split(): ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
Quoted 8 lines · Mark Hatle
I've looked at the patch and it looks find to me.
Acked-by Mark Hatle <[email protected]>One note, however.. Whatever arch fields we use need to also match the fields that get encoded into Zypper and the sat-solver stuff.. So there may be a second chunk of code that needs to be updated to match.
It's the do_archgen functions in both sat-solver and libzypp recipes. They need to match the arch namings.
--Mark
Quoted 63 lines
--Mark
Quoted 45 lines · Robert Yang
rpm can't use the "-" as the arch, which causes problem, e.g., when MACHINE = "beagleboard":
* The arch should be armv7a-vfp-neon, but rpm only takes the armv7a, this is incorrect since it is mixed with real arch armv7a.
* The nativesdk's arch should be i686-nativesdk (or x86_64-nativesdk), but rpm only takes the i686 (or
x86_64), this in incorrect since it is mixed with the arch i686 (orx86_64).Replace "-" with "_" when rpm package and the rootfs generation would fix the problem, I think this is fine since it doesn't change the tune's arch, the package manager doesn't care about the arch's name, but it needs a unify arch system to avoid confusing. This is similar to what we have done on the deb which fixed the arch i486, i586 and so on to i386.
[YOCTO #2328]
Signed-off-by Robert Yang <[email protected]>--- meta/classes/package_rpm.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)meta/classes/package_rpm.bbclass +3
-3@@ -27,12 +27,12 @@ package_update_index_rpm () { fi # Update target packages - base_archs="${PACKAGE_ARCHS}" - ml_archs="${MULTILIB_PACKAGE_ARCHS}" + base_archs="`echo ${PACKAGE_ARCHS} | sed 's/-/_/g'`" + ml_archs="`echo ${MULTILIB_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_TARGET_BASE}" base_archs ml_archs # Update SDK packages - base_archs="${SDK_PACKAGE_ARCHS}" + base_archs="`echo ${SDK_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_HOST_BASE}" base_archs }meta/classes/package_rpm.bbclass python do_package_rpm () { · line 1124
Quoted 8 lines
meta/classes/package_rpm.bbclass +1
-1@@ -1118,7 +1118,7 @@ python do_package_rpm () { rpmbuild = d.getVar('RPMBUILD', True) targetsys = d.getVar('TARGET_SYS', True) targetvendor = d.getVar('TARGET_VENDOR', True) - package_arch = d.getVar('PACKAGE_ARCH', True) or "" + package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") if package_arch not in "all any noarch".split(): ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Hi Mark,
Thanks, The libzypp_git.bb had already changed the "-" to "_", I will update sat-solver_git.bb and send a V2.
// Robert
Quoted 87 lines · Mark Hatle
Quoted 8 lines · Mark Hatle
I've looked at the patch and it looks find to me.
Acked-by Mark Hatle <[email protected]>One note, however.. Whatever arch fields we use need to also match the fields that get encoded into Zypper and the sat-solver stuff.. So there may be a second chunk of code that needs to be updated to match.
It's the
do_archgenfunctions in both sat-solver and libzypp recipes. They need to match the arch namings.--Mark
Quoted 47 lines
--Mark
Quoted 44 lines · Robert Yang
rpm can't use the "-" as the arch, which causes problem, e.g., when MACHINE = "beagleboard":
* The arch should be armv7a-vfp-neon, but rpm only takes the armv7a, this is incorrect since it is mixed with real arch armv7a.
* The nativesdk's arch should be i686-nativesdk (or x86_64-nativesdk), but rpm only takes the i686 (or
x86_64), this in incorrect since it is mixed with the arch i686 (orx86_64).Replace "-" with "_" when rpm package and the rootfs generation would fix the problem, I think this is fine since it doesn't change the tune's arch, the package manager doesn't care about the arch's name, but it needs a unify arch system to avoid confusing. This is similar to what we have done on the deb which fixed the arch i486, i586 and so on to i386.
[YOCTO #2328]
Signed-off-by Robert Yang <[email protected]>--- meta/classes/package_rpm.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)meta/classes/package_rpm.bbclass +2
-2@@ -27,12 +27,12 @@ package_update_index_rpm () { fi # Update target packages - base_archs="${PACKAGE_ARCHS}" - ml_archs="${MULTILIB_PACKAGE_ARCHS}" + base_archs="`echo ${PACKAGE_ARCHS} | sed 's/-/_/g'`" + ml_archs="`echo ${MULTILIB_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_TARGET_BASE}" base_archs
ml_archs# Update SDK packages
meta/classes/package_rpm.bbclass +1
-1- base_archs="${SDK_PACKAGE_ARCHS}" + base_archs="`echo ${SDK_PACKAGE_ARCHS} | sed 's/-/_/g'`" package_update_index_rpm_common "${RPMCONF_HOST_BASE}" base_archs }Quoted 17 lines
meta/classes/package_rpm.bbclass python do_package_rpm () { · line 1124
Quoted 10 lines
meta/classes/package_rpm.bbclass +1
-1@@ -1118,7 +1118,7 @@ python do_package_rpm () { rpmbuild = d.getVar('RPMBUILD', True) targetsys = d.getVar('TARGET_SYS', True) targetvendor = d.getVar('TARGET_VENDOR', True) - package_arch = d.getVar('PACKAGE_ARCH', True) or "" + package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") if package_arch not in "all any noarch".split(): ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core