All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Sanity check for duplicate PACKAGE_ARCHS
@ 2011-03-18 13:41 Joshua Lock
  2011-03-18 16:45 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Lock @ 2011-03-18 13:41 UTC (permalink / raw)
  To: poky

From: Joshua Lock <josh@linux.intel.com>

I have had some pain this morning caused by duplicated entries in my
PACKAGE_ARCHS variable. After Richard helped me debug this he suggest we
add a sanity check for this issue.

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: josh/bernard
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=josh/bernard

Thanks,
    Joshua Lock <josh@linux.intel.com>
---


Joshua Lock (1):
  sanity.bbclass: check for duplicates in PACKAGE_ARCHS

 meta/classes/sanity.bbclass |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

-- 
1.7.4



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

* [PATCH 0/1] Sanity check for duplicate PACKAGE_ARCHS
@ 2011-03-18 13:41 Joshua Lock
  2011-03-18 13:41 ` [PATCH 1/1] sanity.bbclass: check for duplicates in PACKAGE_ARCHS Joshua Lock
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Lock @ 2011-03-18 13:41 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

I have had some pain this morning caused by duplicated entries in my
PACKAGE_ARCHS variable. After Richard helped me debug this he suggest we
add a sanity check for this issue.

Pull URL: git://git.openembedded.org/openembedded-core-contrib
  Branch: josh/pkgarch
  Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=josh/pkgarch

Thanks,
    Joshua Lock <josh@linux.intel.com>
---


Joshua Lock (1):
  sanity.bbclass: check for duplicates in PACKAGE_ARCHS

 meta/classes/sanity.bbclass |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

-- 
1.7.4




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

* [PATCH 1/1] sanity.bbclass: check for duplicates in PACKAGE_ARCHS
  2011-03-18 13:41 [PATCH 0/1] Sanity check for duplicate PACKAGE_ARCHS Joshua Lock
@ 2011-03-18 13:41 ` Joshua Lock
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Lock @ 2011-03-18 13:41 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

Duplicate entries in PACKAGE_ARCHS causes problems with rootfs
generation. For example multiple architecture entries in opkg.conf
will confuse the opkg package manager.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/sanity.bbclass |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 6e13d2a..639e1ea 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -338,6 +338,19 @@ def check_sanity(e):
     elif oeroot.find (' ') != -1:
         messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space."
 
+    # Check that we don't have duplicate entries in PACKAGE_ARCHS
+    pkgarchs = data.getVar('PACKAGE_ARCHS', e.data, True)
+    seen = {}
+    dups = []
+
+    for pa in pkgarchs.split():
+    	if seen.get(pa, 0) == 1:
+	    dups.append(pa)
+	else:
+	    seen[pa] = 1
+    if len(dups):
+       messages = messages + "Error, the PACKAGE_ARCHS variable contains duplicates. The following archs are listed more than once: %s" % " ".join(dups)
+
     if messages != "":
         raise_sanity_error(messages)
 
-- 
1.7.4




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

* Re: [PATCH 0/1] Sanity check for duplicate PACKAGE_ARCHS
  2011-03-18 13:41 [PATCH 0/1] Sanity check for duplicate PACKAGE_ARCHS Joshua Lock
@ 2011-03-18 16:45 ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-03-18 16:45 UTC (permalink / raw)
  To: Joshua Lock; +Cc: poky

On Fri, 2011-03-18 at 13:41 +0000, Joshua Lock wrote:
> From: Joshua Lock <josh@linux.intel.com>
> 
> I have had some pain this morning caused by duplicated entries in my
> PACKAGE_ARCHS variable. After Richard helped me debug this he suggest we
> add a sanity check for this issue.
> 
> Pull URL: git://git.pokylinux.org/poky-contrib.git
>   Branch: josh/bernard
>   Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=josh/bernard
> 
> Thanks,
>     Joshua Lock <josh@linux.intel.com>
> ---
> 
> 
> Joshua Lock (1):
>   sanity.bbclass: check for duplicates in PACKAGE_ARCHS
> 
>  meta/classes/sanity.bbclass |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)

Merged into master, not sure this will make bernard at this point but
its good to have the check.

Cheers,

Richard




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

end of thread, other threads:[~2011-03-18 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 13:41 [PATCH 0/1] Sanity check for duplicate PACKAGE_ARCHS Joshua Lock
2011-03-18 13:41 ` [PATCH 1/1] sanity.bbclass: check for duplicates in PACKAGE_ARCHS Joshua Lock
  -- strict thread matches above, loose matches on Subject: below --
2011-03-18 13:41 [PATCH 0/1] Sanity check for duplicate PACKAGE_ARCHS Joshua Lock
2011-03-18 16:45 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.