Patchwork [CONSOLIDATED,PULL,[v2] 10/14] opkg: Add the condition for the content of arch.conf when enable multilib

login
register
mail settings
Submitter Saul Wold
Date April 10, 2012, 7:26 a.m.
Message ID <d4d2c170055d8413d0cc0e597e714895b35f8b87.1334042473.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/25515/
State New
Headers show

Comments

Saul Wold - April 10, 2012, 7:26 a.m.
From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

After successfully installed some lib32 multilib packages into the
x86-64 image, we just found that the file content of /var/lib/opkg/status in
rootfs changed after the very 1st boot, many lib32 related packages information
are missing in that file.

The missing arch "x86" in arch.conf cause the above problem. Adding the
condition for the content of arch.conf when enable multilib. If build
multilib image, "ALL_MULTILIB_PACKAGE_ARCHS" will be used instead of
"PACKAGE_ARCHS".

[YOCTO #1522]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-devtools/opkg/opkg-config-base_1.0.bb |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Richard Purdie - April 10, 2012, 12:16 p.m.
On Tue, 2012-04-10 at 00:26 -0700, Saul Wold wrote:
> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> 
> After successfully installed some lib32 multilib packages into the
> x86-64 image, we just found that the file content of /var/lib/opkg/status in
> rootfs changed after the very 1st boot, many lib32 related packages information
> are missing in that file.
> 
> The missing arch "x86" in arch.conf cause the above problem. Adding the
> condition for the content of arch.conf when enable multilib. If build
> multilib image, "ALL_MULTILIB_PACKAGE_ARCHS" will be used instead of
> "PACKAGE_ARCHS".
> 
> [YOCTO #1522]
> 
> Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> ---
>  meta/recipes-devtools/opkg/opkg-config-base_1.0.bb |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
> index 3a559cb..f37b2db 100644
> --- a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
> +++ b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
> @@ -9,7 +9,12 @@ do_compile() {
>  	archconf=${S}/${sysconfdir}/opkg/arch.conf
>  
>  	rm -f $archconf
> -	ipkgarchs="${PACKAGE_ARCHS}"
> +	multilibs="${@d.getVar('MULTILIBS',True)}"
> +	if [ "X${multilibs}"  == "XNone" ]; then
> +		ipkgarchs="${PACKAGE_ARCHS}"
> +	else
> +		ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
> +	fi
>  	priority=1
>  	for arch in $ipkgarchs; do 
>  		echo "arch $arch $priority" >> $archconf

I've taken this but is there any reason we can't just use
${ALL_MULTILIB_PACKAGE_ARCHS} in all cases?

Cheers,

Richard
Richard Purdie - April 10, 2012, 12:20 p.m.
On Tue, 2012-04-10 at 00:26 -0700, Saul Wold wrote:
> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> 
> After successfully installed some lib32 multilib packages into the
> x86-64 image, we just found that the file content of /var/lib/opkg/status in
> rootfs changed after the very 1st boot, many lib32 related packages information
> are missing in that file.
> 
> The missing arch "x86" in arch.conf cause the above problem. Adding the
> condition for the content of arch.conf when enable multilib. If build
> multilib image, "ALL_MULTILIB_PACKAGE_ARCHS" will be used instead of
> "PACKAGE_ARCHS".
> 
> [YOCTO #1522]
> 
> Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> ---
>  meta/recipes-devtools/opkg/opkg-config-base_1.0.bb |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
> index 3a559cb..f37b2db 100644
> --- a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
> +++ b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
> @@ -9,7 +9,12 @@ do_compile() {
>  	archconf=${S}/${sysconfdir}/opkg/arch.conf
>  
>  	rm -f $archconf
> -	ipkgarchs="${PACKAGE_ARCHS}"
> +	multilibs="${@d.getVar('MULTILIBS',True)}"
> +	if [ "X${multilibs}"  == "XNone" ]; then
> +		ipkgarchs="${PACKAGE_ARCHS}"
> +	else
> +		ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
> +	fi
>  	priority=1
>  	for arch in $ipkgarchs; do 
>  		echo "arch $arch $priority" >> $archconf

Sorry, I should be clear in my reply. My question is why isn't there a
variable that just lists all of the current compatible package
architectures, whether they're multilibs or otherwise. I'm slightly
concerned we need this if statement.

Its likely cleaning this up is 1.3 material though.

Cheers,

Richard

Patch

diff --git a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
index 3a559cb..f37b2db 100644
--- a/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
+++ b/meta/recipes-devtools/opkg/opkg-config-base_1.0.bb
@@ -9,7 +9,12 @@  do_compile() {
 	archconf=${S}/${sysconfdir}/opkg/arch.conf
 
 	rm -f $archconf
-	ipkgarchs="${PACKAGE_ARCHS}"
+	multilibs="${@d.getVar('MULTILIBS',True)}"
+	if [ "X${multilibs}"  == "XNone" ]; then
+		ipkgarchs="${PACKAGE_ARCHS}"
+	else
+		ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}"
+	fi
 	priority=1
 	for arch in $ipkgarchs; do 
 		echo "arch $arch $priority" >> $archconf