diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package.bbclass | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index b10e6f6a4a..a74ec8a847 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -741,7 +741,8 @@ python split_and_strip_files () { | |||
741 | continue | 741 | continue |
742 | 742 | ||
743 | try: | 743 | try: |
744 | s = os.stat(file) | 744 | ltarget = oe.path.realpath(file, dvar, False) |
745 | s = os.lstat(ltarget) | ||
745 | except OSError, (err, strerror): | 746 | except OSError, (err, strerror): |
746 | if err != errno.ENOENT: | 747 | if err != errno.ENOENT: |
747 | raise | 748 | raise |
@@ -752,11 +753,6 @@ python split_and_strip_files () { | |||
752 | # If it's a symlink, and points to an ELF file, we capture the readlink target | 753 | # If it's a symlink, and points to an ELF file, we capture the readlink target |
753 | if os.path.islink(file): | 754 | if os.path.islink(file): |
754 | target = os.readlink(file) | 755 | target = os.readlink(file) |
755 | if not os.path.isabs(target): | ||
756 | ltarget = os.path.join(os.path.dirname(file), target) | ||
757 | else: | ||
758 | ltarget = target | ||
759 | |||
760 | if isELF(ltarget): | 756 | if isELF(ltarget): |
761 | #bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget))) | 757 | #bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget))) |
762 | symlinks[file] = target | 758 | symlinks[file] = target |
@@ -1005,14 +1001,12 @@ python package_fixsymlinks () { | |||
1005 | rpath = path[len(inst_root):] | 1001 | rpath = path[len(inst_root):] |
1006 | pkg_files[pkg].append(rpath) | 1002 | pkg_files[pkg].append(rpath) |
1007 | try: | 1003 | try: |
1008 | s = os.stat(path) | 1004 | rtarget = oe.path.realpath(path, inst_root, True) |
1005 | os.lstat(rtarget) | ||
1009 | except OSError, (err, strerror): | 1006 | except OSError, (err, strerror): |
1010 | if err != errno.ENOENT: | 1007 | if err != errno.ENOENT: |
1011 | raise | 1008 | raise |
1012 | target = os.readlink(path) | 1009 | dangling_links[pkg].append(os.path.normpath(rtarget[len(inst_root):])) |
1013 | if target[0] != '/': | ||
1014 | target = os.path.join(os.path.dirname(path)[len(inst_root):], target) | ||
1015 | dangling_links[pkg].append(os.path.normpath(target)) | ||
1016 | 1010 | ||
1017 | newrdepends = {} | 1011 | newrdepends = {} |
1018 | for pkg in dangling_links: | 1012 | for pkg in dangling_links: |