summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/update-alternatives.bbclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index e235299a5b..fce1e848f5 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -42,7 +42,7 @@
42# from ALTERNATIVE_LINK_NAME. 42# from ALTERNATIVE_LINK_NAME.
43# 43#
44# NOTE: If the ALTERNATIVE_LINK_NAME and ALTERNATIVE_TARGET are the same, 44# NOTE: If the ALTERNATIVE_LINK_NAME and ALTERNATIVE_TARGET are the same,
45# ALTERNATIVE_TARGET will have '.{PN}' appended to it. If the file 45# ALTERNATIVE_TARGET will have '.{BPN}' appended to it. If the file
46# referenced has not been renamed, it will also be renamed. (This avoids 46# referenced has not been renamed, it will also be renamed. (This avoids
47# the need to rename alternative files in the do_install step, but still 47# the need to rename alternative files in the do_install step, but still
48# supports it if necessary for some reason.) 48# supports it if necessary for some reason.)
@@ -91,8 +91,8 @@
91# listed in ALTERNATIVE_LINKS, say /path/cmd: 91# listed in ALTERNATIVE_LINKS, say /path/cmd:
92# 92#
93# the name of the alternative would be: cmd 93# the name of the alternative would be: cmd
94# the path of installed alternative would be: /path/cmd.${PN} 94# the path of installed alternative would be: /path/cmd.${BPN}
95# ${D}/path/cmd will be renamed to ${D}/path/cmd.{PN} automatically 95# ${D}/path/cmd will be renamed to ${D}/path/cmd.{BPN} automatically
96# priority will be the same from ALTERNATIVE_PRIORITY 96# priority will be the same from ALTERNATIVE_PRIORITY
97# 97#
98# If above assumption breaks your requirement, then you still need to use 98# If above assumption breaks your requirement, then you still need to use
@@ -107,7 +107,7 @@ def update_alternatives_after_parse(d):
107 return 107 return
108 108
109 # The following code is deprecated, but included for compatibility with older packages 109 # The following code is deprecated, but included for compatibility with older packages
110 pn = d.getVar('PN', True) 110 pn = d.getVar('BPN', True)
111 111
112 if d.getVar('ALTERNATIVE_LINKS') != None: 112 if d.getVar('ALTERNATIVE_LINKS') != None:
113 # Convert old format to new format... 113 # Convert old format to new format...
@@ -200,7 +200,7 @@ populate_packages[vardeps] += "${UPDALTVARS} ${@gen_updatealternativesvars(d)}"
200# place. 200# place.
201python perform_packagecopy_append () { 201python perform_packagecopy_append () {
202 # Check for deprecated usage... 202 # Check for deprecated usage...
203 pn = d.getVar('PN', True) 203 pn = d.getVar('BPN', True)
204 if d.getVar('ALTERNATIVE_LINKS', True) != None: 204 if d.getVar('ALTERNATIVE_LINKS', True) != None:
205 bb.warn('%s: Use of ALTERNATIVE_LINKS is deprecated, see update-alternatives.bbclass for more info.' % pn) 205 bb.warn('%s: Use of ALTERNATIVE_LINKS is deprecated, see update-alternatives.bbclass for more info.' % pn)
206 206
@@ -210,7 +210,7 @@ python perform_packagecopy_append () {
210 # Do actual update alternatives processing 210 # Do actual update alternatives processing
211 pkgdest = d.getVar('PKGD', True) 211 pkgdest = d.getVar('PKGD', True)
212 for pkg in (d.getVar('PACKAGES', True) or "").split(): 212 for pkg in (d.getVar('PACKAGES', True) or "").split():
213 # If the src == dest, we know we need to rename the dest by appending ${PN} 213 # If the src == dest, we know we need to rename the dest by appending ${BPN}
214 link_rename = {} 214 link_rename = {}
215 for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split(): 215 for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split():
216 alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True) 216 alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True)
@@ -254,7 +254,7 @@ python perform_packagecopy_append () {
254 bb.note('%s: Rename (link) %s -> %s' % (pn, alt_target, link_rename[alt_target])) 254 bb.note('%s: Rename (link) %s -> %s' % (pn, alt_target, link_rename[alt_target]))
255 os.rename(src, dest) 255 os.rename(src, dest)
256 else: 256 else:
257 # Try to resolve the broken link to link.${PN} 257 # Try to resolve the broken link to link.${BPN}
258 link_maybe = '%s.%s' % (os.readlink(src), pn) 258 link_maybe = '%s.%s' % (os.readlink(src), pn)
259 if os.path.lexists(os.path.join(os.path.dirname(src), link_maybe)): 259 if os.path.lexists(os.path.join(os.path.dirname(src), link_maybe)):
260 # Ok, the renamed link target exists.. create a new link, and remove the original 260 # Ok, the renamed link target exists.. create a new link, and remove the original
@@ -313,7 +313,7 @@ python populate_packages_prepend () {
313} 313}
314 314
315python package_do_filedeps_append () { 315python package_do_filedeps_append () {
316 pn = d.getVar('PN', True) 316 pn = d.getVar('BPN', True)
317 pkgdest = d.getVar('PKGDEST', True) 317 pkgdest = d.getVar('PKGDEST', True)
318 318
319 for pkg in packages.split(): 319 for pkg in packages.split():