]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
UBUNTU: [Packaging] annotations: allow to query using CONFIG_<option> or <option>
authorAndrea Righi <andrea.righi@canonical.com>
Thu, 1 Dec 2022 10:03:05 +0000 (11:03 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Thu, 9 Mar 2023 14:58:10 +0000 (15:58 +0100)
Allow to use CONFIG_FOO or just FOO when querying config options in
annotations.

This can help to speed up config update/reviews simply by doing
copy/paste from the console during an updateconfigs when checking values
from master or other kernels doing queries with annotations.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
debian/scripts/misc/annotations

index 78a8486097b7925cfd7fa133bf93b07e5405148a..c437787ce638db188f9b15853a80a0218bb98814 100755 (executable)
@@ -62,8 +62,11 @@ def arg_fail(message):
 
 def do_query(args):
     a = Annotation(args.file)
-    res = a.search_config(config=args.config, arch=args.arch, flavour=args.flavour)
-    print(json.dumps(res, indent=4))
+    for config in (args.config, 'CONFIG_' + args.config if args.config else None):
+        res = a.search_config(config=config, arch=args.arch, flavour=args.flavour)
+        if res:
+            break
+    print(json.dumps({config or '*': res}, indent=4))
 
 def do_note(args):
     if args.config is None: