summaryrefslogtreecommitdiff
path: root/meta/classes/update-alternatives.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 12:53:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 17:24:26 +0100
commitecea2fab2063a3c478a63e62ba0e80305674c5e0 (patch)
tree847998b3636ac808ff8ab96cd62bed19f882a9d7 /meta/classes/update-alternatives.bbclass
parent0e33e314b1d2d3779658696f13a274b20d698667 (diff)
downloadopenembedded-core-ecea2fab2063a3c478a63e62ba0e80305674c5e0.tar.gz
openembedded-core-ecea2fab2063a3c478a63e62ba0e80305674c5e0.tar.bz2
openembedded-core-ecea2fab2063a3c478a63e62ba0e80305674c5e0.zip
update-alternatives: Fix absolute symlink handling
After the class changes, absolute symlinks are not being handled correctly by the class file. This adds handling for absolute symlinks to account for the pkgdest directory, removing dangling symlink messages from recipes like bzip2. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r--meta/classes/update-alternatives.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index fce1e848f5..9f2e59f584 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -247,7 +247,11 @@ python perform_packagecopy_append () {
for alt_target in link_rename:
src = '%s/%s' % (pkgdest, alt_target)
dest = '%s/%s' % (pkgdest, link_rename[alt_target])
- link_target = os.path.join(os.path.dirname(src), os.readlink(src))
+ 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)
if os.path.lexists(link_target):
# Ok, the link_target exists, we can rename