package_rpm.bbclass: fix the arch (replace "-" with "_")
v2 cover package_rpm.bbclass: fix the arch (replace "-" with "_")
Changes of V2:
* Replace "-" with "_" for sat-solver_git.bb
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.
// Robert
The following changes since commit 5343cdb20ee56a8b507733c637dcc2466ae13288:
bitbake: fetch2: replace double slashes in paths in encodeurl() (2012-09-07 14:50:04 +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 | 10 +++++----- meta/recipes-extended/sat-solver/sat-solver_git.bb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
1.7.11.2
PATCH v2 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 | 10 +++++----- meta/recipes-extended/sat-solver/sat-solver_git.bb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
meta/classes/package_rpm.bbclass +5 -5
@@ -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 }
@@ -1113,8 +1113,8 @@ 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 "" - if package_arch not in "all any noarch".split() and not package_arch.endswith("-nativesdk"): + package_arch = (d.getVar('PACKAGE_ARCH', True) or "").replace("-", "_") + if package_arch not in "all any noarch".split() and not package_arch.endswith("_nativesdk"): ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_") d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch) else:
meta/recipes-extended/sat-solver/sat-solver_git.bb +1 -1
@@ -47,7 +47,7 @@ do_archgen () { all | any | noarch) continue;; esac - INSTALL_PLATFORM_ARCHS="$each_arch $INSTALL_PLATFORM_ARCHS" + INSTALL_PLATFORM_ARCHS="`echo $each_arch | sed 's/-/_/g'` $INSTALL_PLATFORM_ARCHS" done echo "/* Automatically generated by the sat-solver recipe */" > src/core-arch.h
Signature · 1 line
1.7.11.2
Quoted 32 lines · Robert Yang
Changes of V2:
* Replace "-" with "_" for sat-solver_git.bbTest 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 bex86_64_nativesdkori686_nativesdk(it wasx86_64or i686 in the past) when use rpm.// Robert
The following changes since commit
5343cdb20ee56a8b507733c637dcc2466ae13288:bitbake: fetch2: replace double slashes in paths in encodeurl() (2012-09-07 14:50:04 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/rpmarch
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rpmarch
Quoted 7 lines
Robert Yang (1):
package_rpm.bbclass: fix the arch (replace "-" with "_")meta/classes/package_rpm.bbclass | 10 +++++----- meta/recipes-extended/sat-solver/sat-solver_git.bb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
I think this needs rebasing, can you resend please.
Sau!
Quoted 34 lines · Saul Wold
Quoted 33 lines · Robert Yang
Changes of V2:
* Replace "-" with "_" for sat-solver_git.bbTest 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 bex86_64_nativesdkori686_nativesdk(it wasx86_64or i686 in the past) when use rpm.// Robert
The following changes since commit
5343cdb20ee56a8b507733c637dcc2466ae13288:bitbake: fetch2: replace double slashes in paths in
encodeurl()(2012-09-07
14:50:04 +0100)are available in the git repository at:
git://git.pokylinux.org/poky-contribrobert/rpmarch
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/rpmarch
Quoted 9 lines
Quoted 7 lines
Robert Yang (1):
package_rpm.bbclass: fix the arch (replace "-" with "_")meta/classes/package_rpm.bbclass | 10 +++++----- meta/recipes-extended/sat-solver/sat-solver_git.bb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)I think this needs rebasing, can you resend please.
Hi Saul,
It had been merged into master, do you mean rebase for other branch?
// Robert
Quoted 4 lines
Sau!