clean up getVar() usage
PATCH 1/1 clean up getVar() usage
83eac4de updated the usage of getVar() in classes/selinux.bbclass to leave out the default expand parameter. This is consistent with the usage in the core layers.
Bring all other calls to getVar() in the layer into alignment with this approach.
Signed-off-by Joe MacDonald <[email protected]>
--- recipes-core/busybox/busybox_selinux.inc | 8 ++++---- recipes-security/refpolicy/refpolicy_common.inc | 2 +- recipes-security/selinux/libselinux-python.inc | 2 +- recipes-security/selinux/libselinux.inc | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
recipes-core/busybox/busybox_selinux.inc +4 -4
@@ -8,9 +8,9 @@ python create_sh_wrapper_reset_alternative_vars () { # We need to load the full set of busybox provides from the /etc/busybox.links # Use this to see the update-alternatives with the right information - dvar = d.getVar('D', True) - pn = d.getVar('PN', True) - base_bindir = d.getVar('base_bindir', True) + dvar = d.getVar('D') + pn = d.getVar('PN') + base_bindir = d.getVar('base_bindir') def create_sh_alternative_vars(links, target, mode): import shutil
@@ -20,7 +20,7 @@ python create_sh_wrapper_reset_alternative_vars () { os.fchmod(fwp.fileno(), mode) fwp.close() # Install the sh wrappers and alternatives reset to link to them - wpdir = os.path.join(d.getVar('libdir', True), pn) + wpdir = os.path.join(d.getVar('libdir'), pn) wpdir_dest = '%s%s' % (dvar, wpdir) if not os.path.exists(wpdir_dest): os.makedirs(wpdir_dest)
recipes-security/refpolicy/refpolicy_common.inc +1 -1
@@ -117,7 +117,7 @@ python __anonymous () { # make sure DEFAULT_ENFORCING is something sane if not re.match('^(enforcing|permissive|disabled)$', - d.getVar('DEFAULT_ENFORCING', True), + d.getVar('DEFAULT_ENFORCING'), flags=0): d.setVar('DEFAULT_ENFORCING', 'permissive') }
recipes-security/selinux/libselinux-python.inc +1 -1
@@ -14,7 +14,7 @@ RDEPENDS_${PN} += "libselinux python3-core python3-shell" def get_policyconfigarch(d): import re - target = d.getVar('TARGET_ARCH', True) + target = d.getVar('TARGET_ARCH') p = re.compile('i.86') target = p.sub('i386',target) return "ARCH=%s" % (target)
recipes-security/selinux/libselinux.inc +1 -1
@@ -12,7 +12,7 @@ DEPENDS_append_libc-musl = " fts" def get_policyconfigarch(d): import re - target = d.getVar('TARGET_ARCH', True) + target = d.getVar('TARGET_ARCH') p = re.compile('i.86') target = p.sub('i386',target) return "ARCH=%s" % (target)
Signature · 1 line
2.20.1