From 89566d5a9b7c71ff528bf7e6e7c60f536f467a5d Mon Sep 17 00:00:00 2001 From: yukang Date: Wed, 29 Mar 2023 00:00:15 +0800 Subject: [PATCH] configure --set support list as arguments --- src/bootstrap/configure.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index dd1851e29a9..fc105b1fded 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -182,6 +182,11 @@ def err(msg): print("configure: error: " + msg) sys.exit(1) +def is_value_list(key): + for option in options: + if option.name == key and option.desc.startswith('List of'): + return True + return False if '--help' in sys.argv or '-h' in sys.argv: print('Usage: ./configure [options]') @@ -295,6 +300,8 @@ def set(key, value, config): parts = key.split('.') for i, part in enumerate(parts): if i == len(parts) - 1: + if is_value_list(part): + value = value.split(',') arr[part] = value else: if part not in arr: