[oe-commits] Richard Purdie : debian: fixup2

git at git.openembedded.org git at git.openembedded.org
Fri Aug 22 23:16:36 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: fd6c7e36df6b8a4340df9b7c382da3cdb83c4e0b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=fd6c7e36df6b8a4340df9b7c382da3cdb83c4e0b

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Aug 22 23:14:58 2014 +0000

debian: fixup2

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/debian.bbclass | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index bf2e56d..c859703 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -52,6 +52,13 @@ python debian_package_name_hook () {
             return 0
         return (s[stat.ST_MODE] & stat.S_IEXEC)
 
+    def add_rprovides(pkg, d):
+        newpkg = d.getVar('PKG_' + pkg)
+        if newpkg and newpkg != pkg:
+            provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split()
+            if pkg not in provs:
+                d.appendVar('RPROVIDES_' + pkg, " " + pkg)
+
     def auto_libname(packages, orig_pkg):
         sonames = []
         has_bins = 0
@@ -99,9 +106,7 @@ python debian_package_name_hook () {
                 (pkgname, devname) = soname_result
                 for pkg in packages.split():
                     if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)):
-                        provs =  (d.getVar('RPROVIDES_' + pkg, True) or "").split()
-                        if pkg not in provs:
-                            d.appendVar('RPROVIDES_' + pkg, " " + pkg)
+                        add_rprovides(pkg, d)
                         continue
                     debian_pn = d.getVar('DEBIANNAME_' + pkg)
                     if debian_pn:
@@ -116,7 +121,9 @@ python debian_package_name_hook () {
                             newpkg = mlpre + newpkg
                     if newpkg != pkg:
                         d.setVar('PKG_' + pkg, newpkg)
-                        d.appendVar('RPROVIDES_' + pkg, " " + pkg)
+                        add_rprovides(pkg, d)
+        else:
+            add_rprovides(orig_pkg, d)
 
     # reversed sort is needed when some package is substring of another
     # ie in ncurses we get without reverse sort: 



More information about the Openembedded-commits mailing list