]> code.ossystems Code Review - openembedded-core.git/commitdiff
package: Fix darwin shlibs code
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Aug 2014 15:22:49 +0000 (15:22 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Aug 2014 15:24:48 +0000 (16:24 +0100)
We need to scan binaries as well as libraries for dependencies.

Also ensure if its not an object file (as found by otool), we handle
this case.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package.bbclass

index 97a92eff22559656fee1c98fbe8e2dc65d0126f8..6a552d904eb3526454f109b3e96a7aad89743d80 100644 (file)
@@ -1470,17 +1470,19 @@ python package_do_shlibs() {
                     if l.startswith('path '):
                         rpath.append(l.split()[1])
 
-            p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
-            err, out = p.communicate()
-            # If returned succesfully, process stderr for results
-            if p.returncode == 0:
-                for l in err.split("\n"):
-                    l = l.strip()
-                    if not l or l.endswith(":"):
-                        continue
-                    name = os.path.basename(l.split()[0]).rsplit(".", 1)[0]
-                    if name and name not in needed[pkg]:
-                         needed[pkg].append((name, file, []))
+        p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
+        err, out = p.communicate()
+        # If returned succesfully, process stderr for results
+        if p.returncode == 0:
+            for l in err.split("\n"):
+                l = l.strip()
+                if not l or l.endswith(":"):
+                    continue
+                if "is not an object file" in l:
+                    continue
+                name = os.path.basename(l.split()[0]).rsplit(".", 1)[0]
+                if name and name not in needed[pkg]:
+                     needed[pkg].append((name, file, []))
 
     if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
         snap_symlinks = True