diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2013-02-10 13:41:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-11 14:46:11 +0000 |
commit | a09c5d66732fdd22b0f5f78304000798db88e495 (patch) | |
tree | 966e3fb410d2ffb90bc8d5f0ae7995c08e57e339 /meta/classes | |
parent | 1a80329b3fcf23ecc23e409a260b9b2182652f65 (diff) | |
download | poky-a09c5d66732fdd22b0f5f78304000798db88e495.tar.gz |
update-alternatives.bblcass: use oe.path.realpath()
oe.path.realpath() provides are common and more correct implementation
for resolving symlinks within sysroot. Use it.
(From OE-Core rev: 2fa5cc0d08e855e24a4497601d7cc73b9f2aa550)
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/update-alternatives.bbclass | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass index 8f4d0976a9..0cefc51576 100644 --- a/meta/classes/update-alternatives.bbclass +++ b/meta/classes/update-alternatives.bbclass | |||
@@ -261,10 +261,7 @@ python perform_packagecopy_append () { | |||
261 | src = '%s/%s' % (pkgdest, alt_target) | 261 | src = '%s/%s' % (pkgdest, alt_target) |
262 | dest = '%s/%s' % (pkgdest, link_rename[alt_target]) | 262 | dest = '%s/%s' % (pkgdest, link_rename[alt_target]) |
263 | link = os.readlink(src) | 263 | link = os.readlink(src) |
264 | if os.path.isabs(link): | 264 | link_target = oe.path.realpath(src, pkgdest, True) |
265 | link_target = pkgdest + os.readlink(src) | ||
266 | else: | ||
267 | link_target = os.path.join(os.path.dirname(src), link) | ||
268 | 265 | ||
269 | if os.path.lexists(link_target): | 266 | if os.path.lexists(link_target): |
270 | # Ok, the link_target exists, we can rename | 267 | # Ok, the link_target exists, we can rename |