summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/update-alternatives.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index f3c014a5fc..e252651128 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -138,6 +138,14 @@ python apply_update_alternative_renames () {
138 if not update_alternatives_enabled(d): 138 if not update_alternatives_enabled(d):
139 return 139 return
140 140
141 from re import sub
142
143 def update_files(alt_target, alt_target_rename, pkg, d):
144 f = d.getVar('FILES_' + pkg)
145 if f:
146 f = sub(r'(^|\s)%s(\s|$)' % alt_target, r'\1%s\2' % alt_target_rename, f)
147 d.setVar('FILES_' + pkg, f)
148
141 # Check for deprecated usage... 149 # Check for deprecated usage...
142 pn = d.getVar('BPN') 150 pn = d.getVar('BPN')
143 if d.getVar('ALTERNATIVE_LINKS') != None: 151 if d.getVar('ALTERNATIVE_LINKS') != None:
@@ -177,6 +185,7 @@ python apply_update_alternative_renames () {
177 else: 185 else:
178 bb.note('%s: Rename %s -> %s' % (pn, alt_target, alt_target_rename)) 186 bb.note('%s: Rename %s -> %s' % (pn, alt_target, alt_target_rename))
179 os.rename(src, dest) 187 os.rename(src, dest)
188 update_files(alt_target, alt_target_rename, pkg, d)
180 else: 189 else:
181 bb.warn("%s: alternative target (%s or %s) does not exist, skipping..." % (pn, alt_target, alt_target_rename)) 190 bb.warn("%s: alternative target (%s or %s) does not exist, skipping..." % (pn, alt_target, alt_target_rename))
182 continue 191 continue
@@ -203,6 +212,8 @@ python apply_update_alternative_renames () {
203 os.unlink(src) 212 os.unlink(src)
204 else: 213 else:
205 bb.warn('%s: Unable to resolve dangling symlink: %s' % (pn, alt_target)) 214 bb.warn('%s: Unable to resolve dangling symlink: %s' % (pn, alt_target))
215 continue
216 update_files(alt_target, alt_target_rename, pkg, d)
206} 217}
207 218
208PACKAGESPLITFUNCS_prepend = "populate_packages_updatealternatives " 219PACKAGESPLITFUNCS_prepend = "populate_packages_updatealternatives "