public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: package.bbclass: Fix shlibs cross package-arch contamination
Date: Sat, 19 Jan 2013 23:47:02 +0000	[thread overview]
Message-ID: <1358639222.14265.3.camel@ted> (raw)

I found that if I had two packages architectures built (say core2 and i586),
that the shlibs data from i586 was being used in the core2 build. This
lead to odd dependency issues if the i586 build was out of date and core2
was being targetted.

When loading shlibs files, the last loaded wins so we need to iterate the
lists from least to strongest weighting, not the other way around. With this
patch applied, the contamination issue is resolved.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index b06cca5..66bf4ba 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1521,7 +1521,8 @@ python package_do_shlibs() {
             d.setVar('pkg_postinst_%s' % pkg, postinst)
 
     list_re = re.compile('^(.*)\.list$')
-    for dir in shlibs_dirs:
+    # Go from least to most specific since the last one found wins
+    for dir in reversed(shlibs_dirs):
         if not os.path.exists(dir):
             continue
         for file in os.listdir(dir):
@@ -1643,7 +1644,8 @@ python package_do_pkgconfig () {
                 f.write('%s\n' % p)
             f.close()
 
-    for dir in shlibs_dirs:
+    # Go from least to most specific since the last one found wins
+    for dir in reversed(shlibs_dirs):
         if not os.path.exists(dir):
             continue
         for file in os.listdir(dir):





                 reply	other threads:[~2013-01-20  0:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358639222.14265.3.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox