]> code.ossystems Code Review - openembedded-core.git/commitdiff
update-alternatives.bbclass: use absolute paths for link targets
authorChristopher Larson <chris_larson@mentor.com>
Sat, 29 Dec 2012 05:19:23 +0000 (22:19 -0700)
committerSaul Wold <sgw@linux.intel.com>
Sat, 5 Jan 2013 06:12:05 +0000 (22:12 -0800)
This improves compatibility, as both the debian update-alternatives and the
chkconfig alternatives require absolute paths.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/update-alternatives.bbclass

index a3631eca7e9eb3fe54f231e626b10508826e0c22..556ee7cbae84cee6971932da9e77c09e4f306e41 100644 (file)
@@ -298,7 +298,7 @@ python populate_packages_prepend () {
                 continue
 
             # Default to generate shell script.. eventually we may want to change this...
-            alt_target = os.path.relpath(alt_target, os.path.dirname(alt_link))
+            alt_target = os.path.normpath(alt_target)
 
             alt_setup_links  += '\tupdate-alternatives --install %s %s %s %s\n' % (alt_link, alt_name, alt_target, alt_priority)
             alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)