Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] package_rpm.bbclass: fix the arch (replace "-" with "_")
@ 2012-08-28 15:45 Robert Yang
  2012-08-28 15:45 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2012-08-28 15:45 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

Test info:
MACHINE = beagleboard/mpc8315e-rdb/qemux86
PACKAGE_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(-)

-- 
1.7.11.2




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] package_rpm.bbclass: fix the arch (replace "-" with "_")
  2012-08-28 15:45 [PATCH 0/1] package_rpm.bbclass: fix the arch (replace "-" with "_") Robert Yang
@ 2012-08-28 15:45 ` Robert Yang
  2012-09-06 16:52   ` Mark Hatle
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2012-08-28 15:45 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/package_rpm.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 9abad5e..87dd367 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -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)
-- 
1.7.11.2




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] package_rpm.bbclass: fix the arch (replace "-" with "_")
  2012-08-28 15:45 ` [PATCH 1/1] " Robert Yang
@ 2012-09-06 16:52   ` Mark Hatle
  2012-09-06 17:38     ` Mark Hatle
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2012-09-06 16:52 UTC (permalink / raw)
  To: openembedded-core

I've looked at the patch and it looks find to me.

Acked-by: Mark Hatle <mark.hatle@windriver.com>


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

On 8/28/12 10:45 AM, Robert Yang wrote:
> 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]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>   meta/classes/package_rpm.bbclass | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 9abad5e..87dd367 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -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)
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] package_rpm.bbclass: fix the arch (replace "-" with "_")
  2012-09-06 16:52   ` Mark Hatle
@ 2012-09-06 17:38     ` Mark Hatle
  2012-09-10  3:16       ` Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2012-09-06 17:38 UTC (permalink / raw)
  To: openembedded-core

On 9/6/12 11:52 AM, Mark Hatle wrote:
> I've looked at the patch and it looks find to me.
>
> Acked-by: Mark Hatle <mark.hatle@windriver.com>
>
>
> 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

> --Mark
>
> On 8/28/12 10:45 AM, Robert Yang wrote:
>> 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]
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>>    meta/classes/package_rpm.bbclass | 8 ++++----
>>    1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
>> index 9abad5e..87dd367 100644
>> --- a/meta/classes/package_rpm.bbclass
>> +++ b/meta/classes/package_rpm.bbclass
>> @@ -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)
>>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] package_rpm.bbclass: fix the arch (replace "-" with "_")
  2012-09-06 17:38     ` Mark Hatle
@ 2012-09-10  3:16       ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2012-09-10  3:16 UTC (permalink / raw)
  To: Mark Hatle; +Cc: 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

On 09/07/2012 01:38 AM, Mark Hatle wrote:
> On 9/6/12 11:52 AM, Mark Hatle wrote:
>> I've looked at the patch and it looks find to me.
>>
>> Acked-by: Mark Hatle <mark.hatle@windriver.com>
>>
>>
>> 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
>
>> --Mark
>>
>> On 8/28/12 10:45 AM, Robert Yang wrote:
>>> 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]
>>>
>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>> ---
>>>    meta/classes/package_rpm.bbclass | 8 ++++----
>>>    1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
>>> index 9abad5e..87dd367 100644
>>> --- a/meta/classes/package_rpm.bbclass
>>> +++ b/meta/classes/package_rpm.bbclass
>>> @@ -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)
>>>
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] package_rpm.bbclass: fix the arch (replace "-" with "_")
  2012-09-10  7:58 [PATCH 0/1 V2] " Robert Yang
@ 2012-09-10  7:58 ` Robert Yang
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2012-09-10  7:58 UTC (permalink / raw)
  To: openembedded-core; +Cc: Zhenfeng.Zhao

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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/package_rpm.bbclass                   | 10 +++++-----
 meta/recipes-extended/sat-solver/sat-solver_git.bb |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 742f292..43cdd57 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -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:
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
index e1054e9..67503b7 100644
--- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -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
-- 
1.7.11.2




^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-10  8:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28 15:45 [PATCH 0/1] package_rpm.bbclass: fix the arch (replace "-" with "_") Robert Yang
2012-08-28 15:45 ` [PATCH 1/1] " Robert Yang
2012-09-06 16:52   ` Mark Hatle
2012-09-06 17:38     ` Mark Hatle
2012-09-10  3:16       ` Robert Yang
  -- strict thread matches above, loose matches on Subject: below --
2012-09-10  7:58 [PATCH 0/1 V2] " Robert Yang
2012-09-10  7:58 ` [PATCH 1/1] " Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox