diff options
-rw-r--r-- | meta/classes/update-alternatives.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass index e252651128..537e85d9a3 100644 --- a/meta/classes/update-alternatives.bbclass +++ b/meta/classes/update-alternatives.bbclass | |||
@@ -138,12 +138,12 @@ 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 | 141 | import re |
142 | 142 | ||
143 | def update_files(alt_target, alt_target_rename, pkg, d): | 143 | def update_files(alt_target, alt_target_rename, pkg, d): |
144 | f = d.getVar('FILES_' + pkg) | 144 | f = d.getVar('FILES_' + pkg) |
145 | if f: | 145 | if f: |
146 | f = sub(r'(^|\s)%s(\s|$)' % alt_target, r'\1%s\2' % alt_target_rename, f) | 146 | f = re.sub(r'(^|\s)%s(\s|$)' % re.escape (alt_target), r'\1%s\2' % alt_target_rename, f) |
147 | d.setVar('FILES_' + pkg, f) | 147 | d.setVar('FILES_' + pkg, f) |
148 | 148 | ||
149 | # Check for deprecated usage... | 149 | # Check for deprecated usage... |