mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 12:23:36 +08:00
minikconf: do not include variables from MINIKCONF_ARGS in config-all-devices.mak
When minikconf writes config-devices.mak, it includes all variables including those from MINIKCONF_ARGS. This causes values from config-host.mak to "stick" to the ones used in generating config-devices.mak, because config-devices.mak is included after config-host.mak. Avoid this by omitting assignments coming from the command line in the output of minikconf. Reported-by: Christophe de Dinechin <dinechin@redhat.com> Reviewed-by: Christophe de Dinechin <dinechin@redhat.com> Tested-by: Christophe de Dinechin <dinechin@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
4b03403f76
commit
6b7ac49d57
@ -688,11 +688,13 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
data = KconfigData(mode)
|
data = KconfigData(mode)
|
||||||
parser = KconfigParser(data)
|
parser = KconfigParser(data)
|
||||||
|
external_vars = set()
|
||||||
for arg in argv[3:]:
|
for arg in argv[3:]:
|
||||||
m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([yn]?)$', arg)
|
m = re.match(r'^(CONFIG_[A-Z0-9_]+)=([yn]?)$', arg)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
name, value = m.groups()
|
name, value = m.groups()
|
||||||
parser.do_assignment(name, value == 'y')
|
parser.do_assignment(name, value == 'y')
|
||||||
|
external_vars.add(name[7:])
|
||||||
else:
|
else:
|
||||||
fp = open(arg, 'r')
|
fp = open(arg, 'r')
|
||||||
parser.parse_file(fp)
|
parser.parse_file(fp)
|
||||||
@ -700,7 +702,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
config = data.compute_config()
|
config = data.compute_config()
|
||||||
for key in sorted(config.keys()):
|
for key in sorted(config.keys()):
|
||||||
print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n')))
|
if key not in external_vars:
|
||||||
|
print ('CONFIG_%s=%s' % (key, ('y' if config[key] else 'n')))
|
||||||
|
|
||||||
deps = open(argv[2], 'w')
|
deps = open(argv[2], 'w')
|
||||||
for fname in data.previously_included:
|
for fname in data.previously_included:
|
||||||
|
Loading…
Reference in New Issue
Block a user