summaryrefslogtreecommitdiffstats
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:32:31 +0100
commit0b8d5dad9cc3eaff77b03e72039a63a0a670b321 (patch)
tree7fbd291865701a7b5103006e270d886436426a89
parentb3e76b33f354c7747f86514abd3844afba64d8bb (diff)
downloadpoky-0b8d5dad9cc3eaff77b03e72039a63a0a670b321.tar.gz
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. (From OE-Core rev: ecea2fab2063a3c478a63e62ba0e80305674c5e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 () {
247 for alt_target in link_rename: 247 for alt_target in link_rename:
248 src = '%s/%s' % (pkgdest, alt_target) 248 src = '%s/%s' % (pkgdest, alt_target)
249 dest = '%s/%s' % (pkgdest, link_rename[alt_target]) 249 dest = '%s/%s' % (pkgdest, link_rename[alt_target])
250 link_target = os.path.join(os.path.dirname(src), os.readlink(src)) 250 link = os.readlink(src)
251 if os.path.isabs(link):
252 link_target = pkgdest + os.readlink(src)
253 else:
254 link_target = os.path.join(os.path.dirname(src), link)
251 255
252 if os.path.lexists(link_target): 256 if os.path.lexists(link_target):
253 # Ok, the link_target exists, we can rename 257 # Ok, the link_target exists, we can rename