summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-11-23 19:04:52 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-23 23:35:19 +0000
commitfec5323dba7e23a42073995020c7336f3e6a7de1 (patch)
treeea3788c90c0d1dcd2993d1a855cc590455ab5f56 /meta/recipes-core/busybox
parent00379e95894de195788b80b7dec9ba5dfe3ad1bd (diff)
downloadpoky-fec5323dba7e23a42073995020c7336f3e6a7de1.tar.gz
recipes: Remove tab indentations in python code
Use 4 spaces to replace a tab. (From OE-Core rev: cbb6743d46752481782789fa1a0dfade11057114) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox')
-rw-r--r--meta/recipes-core/busybox/busybox.inc42
1 files changed, 21 insertions, 21 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index b8d8858e5c..6abbb5492f 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -55,35 +55,35 @@ inherit cml1 systemd update-rc.d ptest
55 55
56# internal helper 56# internal helper
57def busybox_cfg(feature, tokens, cnf, rem): 57def busybox_cfg(feature, tokens, cnf, rem):
58 if type(tokens) == type(""): 58 if type(tokens) == type(""):
59 tokens = [tokens] 59 tokens = [tokens]
60 rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens]) 60 rem.extend(['/^[# ]*' + token + '[ =]/d' for token in tokens])
61 if feature: 61 if feature:
62 cnf.extend([token + '=y' for token in tokens]) 62 cnf.extend([token + '=y' for token in tokens])
63 else: 63 else:
64 cnf.extend(['# ' + token + ' is not set' for token in tokens]) 64 cnf.extend(['# ' + token + ' is not set' for token in tokens])
65 65
66# Map distro features to config settings 66# Map distro features to config settings
67def features_to_busybox_settings(d): 67def features_to_busybox_settings(d):
68 cnf, rem = ([], []) 68 cnf, rem = ([], [])
69 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IPV6', cnf, rem) 69 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IPV6', cnf, rem)
70 busybox_cfg(True, 'CONFIG_LFS', cnf, rem) 70 busybox_cfg(True, 'CONFIG_LFS', cnf, rem)
71 busybox_cfg(True, 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem) 71 busybox_cfg(True, 'CONFIG_FDISK_SUPPORT_LARGE_DISKS', cnf, rem)
72 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'nls', True, False, d), 'CONFIG_LOCALE_SUPPORT', cnf, rem) 72 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'nls', True, False, d), 'CONFIG_LOCALE_SUPPORT', cnf, rem)
73 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem) 73 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem)
74 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem) 74 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem)
75 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'wifi', True, False, d), 'CONFIG_RFKILL', cnf, rem) 75 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'wifi', True, False, d), 'CONFIG_RFKILL', cnf, rem)
76 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'bluetooth', True, False, d), 'CONFIG_RFKILL', cnf, rem) 76 busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'bluetooth', True, False, d), 'CONFIG_RFKILL', cnf, rem)
77 return "\n".join(cnf), "\n".join(rem) 77 return "\n".join(cnf), "\n".join(rem)
78 78
79# X, Y = ${@features_to_busybox_settings(d)} 79# X, Y = ${@features_to_busybox_settings(d)}
80# unfortunately doesn't seem to work with bitbake, workaround: 80# unfortunately doesn't seem to work with bitbake, workaround:
81def features_to_busybox_conf(d): 81def features_to_busybox_conf(d):
82 cnf, rem = features_to_busybox_settings(d) 82 cnf, rem = features_to_busybox_settings(d)
83 return cnf 83 return cnf
84def features_to_busybox_del(d): 84def features_to_busybox_del(d):
85 cnf, rem = features_to_busybox_settings(d) 85 cnf, rem = features_to_busybox_settings(d)
86 return rem 86 return rem
87 87
88configmangle = '/CONFIG_EXTRA_CFLAGS/d; \ 88configmangle = '/CONFIG_EXTRA_CFLAGS/d; \
89 ' 89 '