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>
This commit is contained in:
Enrico Scholz 2013-02-10 13:41:48 +01:00 committed by Richard Purdie
parent 1a80329b3f
commit a09c5d6673
1 changed files with 1 additions and 4 deletions

View File

@ -261,10 +261,7 @@ python perform_packagecopy_append () {
src = '%s/%s' % (pkgdest, alt_target)
dest = '%s/%s' % (pkgdest, link_rename[alt_target])
link = os.readlink(src)
if os.path.isabs(link):
link_target = pkgdest + os.readlink(src)
else:
link_target = os.path.join(os.path.dirname(src), link)
link_target = oe.path.realpath(src, pkgdest, True)
if os.path.lexists(link_target):
# Ok, the link_target exists, we can rename