diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | 3c59b1bf93adb0b9f723bda1d8702c8720733677 (patch) | |
tree | d1939643e2d02f0ce2e9ef33e235cd23cd5000d3 /meta/classes/update-alternatives.bbclass | |
parent | c0f2890c01882e9ea14e781c044f3a84f75bd0fc (diff) | |
download | poky-3c59b1bf93adb0b9f723bda1d8702c8720733677.tar.gz |
meta: remove True option to getVarFlag calls
getVarFlag() now defaults to expanding by default, thus remove the
True option from getVarFlag() calls with a regex search and
replace.
Search made with the following regex:
getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\)
(From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/update-alternatives.bbclass')
-rw-r--r-- | meta/classes/update-alternatives.bbclass | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass index 65da9dadbe..0460bf0241 100644 --- a/meta/classes/update-alternatives.bbclass +++ b/meta/classes/update-alternatives.bbclass | |||
@@ -133,12 +133,12 @@ python perform_packagecopy_append () { | |||
133 | # If the src == dest, we know we need to rename the dest by appending ${BPN} | 133 | # If the src == dest, we know we need to rename the dest by appending ${BPN} |
134 | link_rename = {} | 134 | link_rename = {} |
135 | for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split(): | 135 | for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split(): |
136 | alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True) | 136 | alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name) |
137 | if not alt_link: | 137 | if not alt_link: |
138 | alt_link = "%s/%s" % (d.getVar('bindir'), alt_name) | 138 | alt_link = "%s/%s" % (d.getVar('bindir'), alt_name) |
139 | d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link) | 139 | d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link) |
140 | 140 | ||
141 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True) | 141 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name) |
142 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link | 142 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link |
143 | # Sometimes alt_target is specified as relative to the link name. | 143 | # Sometimes alt_target is specified as relative to the link name. |
144 | alt_target = os.path.join(os.path.dirname(alt_link), alt_target) | 144 | alt_target = os.path.join(os.path.dirname(alt_link), alt_target) |
@@ -198,13 +198,13 @@ python populate_packages_updatealternatives () { | |||
198 | alt_setup_links = "" | 198 | alt_setup_links = "" |
199 | alt_remove_links = "" | 199 | alt_remove_links = "" |
200 | for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split(): | 200 | for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split(): |
201 | alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True) | 201 | alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name) |
202 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True) | 202 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name) |
203 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link | 203 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link |
204 | # Sometimes alt_target is specified as relative to the link name. | 204 | # Sometimes alt_target is specified as relative to the link name. |
205 | alt_target = os.path.join(os.path.dirname(alt_link), alt_target) | 205 | alt_target = os.path.join(os.path.dirname(alt_link), alt_target) |
206 | 206 | ||
207 | alt_priority = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_PRIORITY', alt_name, True) | 207 | alt_priority = d.getVarFlag('ALTERNATIVE_PRIORITY_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_PRIORITY', alt_name) |
208 | alt_priority = alt_priority or d.getVar('ALTERNATIVE_PRIORITY_%s' % pkg) or d.getVar('ALTERNATIVE_PRIORITY') | 208 | alt_priority = alt_priority or d.getVar('ALTERNATIVE_PRIORITY_%s' % pkg) or d.getVar('ALTERNATIVE_PRIORITY') |
209 | 209 | ||
210 | # This shouldn't trigger, as it should have been resolved earlier! | 210 | # This shouldn't trigger, as it should have been resolved earlier! |
@@ -247,8 +247,8 @@ python package_do_filedeps_append () { | |||
247 | 247 | ||
248 | for pkg in packages.split(): | 248 | for pkg in packages.split(): |
249 | for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split(): | 249 | for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg) or "").split(): |
250 | alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, True) | 250 | alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name) |
251 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True) | 251 | alt_target = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, alt_name) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name) |
252 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link | 252 | alt_target = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg) or d.getVar('ALTERNATIVE_TARGET') or alt_link |
253 | 253 | ||
254 | if alt_link == alt_target: | 254 | if alt_link == alt_target: |