Merge bk://openembedded@openembedded.bkbits.net/packages
authorPhil Blundell <philb@gnu.org>
Sat, 24 Jul 2004 14:44:46 +0000 (14:44 +0000)
committerPhil Blundell <philb@gnu.org>
Sat, 24 Jul 2004 14:44:46 +0000 (14:44 +0000)
into workhouse.nexus.co.uk:/home/pb/oe/oe-packages

2004/07/24 15:44:18+01:00 nexus.co.uk!pb
normalise symlink paths before trying to look them up.

BKrev: 410275deNTlGqGjwld5OA2goFFuOJA

classes/package.oeclass

index 96c5814..207269f 100644 (file)
@@ -217,19 +217,25 @@ python populate_packages () {
                                        target = os.readlink(path)
                                        if target[0] != '/':
                                                target = os.path.join(root[len(inst_root):], target)
-                                       dangling_links[pkg].append(target)
+                                       dangling_links[pkg].append(os.path.normpath(target))
 
        for pkg in packages.split():
+               rdepends = explode_deps(oe.data.getVar('RDEPENDS_' + pkg, d, 1) or oe.data.getVar('RDEPENDS', d, 1) or "")
                for l in dangling_links[pkg]:
+                       found = False
                        oe.debug(1, "%s contains dangling link %s" % (pkg, l))
                        for p in packages.split():
                                for f in pkg_files[p]:
                                        if f == l:
+                                               found = True
                                                oe.debug(1, "target found in %s" % p)
-                                               rdepends = explode_deps(oe.data.getVar('RDEPENDS_' + pkg, d, 1) or oe.data.getVar('RDEPENDS', d, 1) or "")
-                                               rdepends.append(oe.data.getVar('PKG_' + p, d, 1) or p)
-                                               oe.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
+                                               dp = oe.data.getVar('PKG_' + p, d, 1) or p
+                                               if not dp in rdepends:
+                                                       rdepends.append(dp)
                                                break
+                       if found == False:
+                               oe.note("%s contains dangling symlink to %s" % (pkg, l))
+               oe.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
 
        def write_if_exists(f, pkg, var):
                def encode(str):