All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/oe-pkgdata-util: find complementary packages for split packages
@ 2013-04-08 16:18 Paul Eggleton
  0 siblings, 0 replies; only message in thread
From: Paul Eggleton @ 2013-04-08 16:18 UTC (permalink / raw)
  To: openembedded-core

Check after getting the original package name (e.g. undoing Debian
renaming) if there is a complementary package for that name, e.g. if
the glob is *-dev, then libudev0 -> libudev -> libudev-dev.

Fixes [YOCTO #4136].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/oe-pkgdata-util |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 900c27a..629b2d5 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -115,14 +115,21 @@ def glob(args):
                     if not os.path.exists(fwdfile + ".packaged"):
                         mappedpkg = ""
                 else:
-                    # That didn't work, so now get the PN, substitute that, then map in the other direction
                     revlink = revpkgdata(pkg)
                     if os.path.exists(revlink):
-                        pn = readpn(revlink)
-                        newpkg = g.replace("*", pn)
+                        # Check if we can map after undoing the package renaming (by resolving the symlink)
+                        origpkg = os.path.basename(os.readlink(revlink))
+                        newpkg = g.replace("*", origpkg)
                         fwdfile = fwdpkgdata(newpkg)
                         if os.path.exists(fwdfile):
                             mappedpkg = readrenamed(fwdfile)
+                        else:
+                            # That didn't work, so now get the PN, substitute that, then map in the other direction
+                            pn = readpn(revlink)
+                            newpkg = g.replace("*", pn)
+                            fwdfile = fwdpkgdata(newpkg)
+                            if os.path.exists(fwdfile):
+                                mappedpkg = readrenamed(fwdfile)
                         if not os.path.exists(fwdfile + ".packaged"):
                             mappedpkg = ""
                     else:
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-08 16:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 16:18 [PATCH] scripts/oe-pkgdata-util: find complementary packages for split packages Paul Eggleton

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.