1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
From: Stefano Babic <stefano.babic@swupdate.org>
Date: Thu, 18 Sep 2025 17:27:16 +0200
Subject: Revert "Handle multiple configuration files"
This reverts commit af6f21260b85c0c3c5c779d04d0ca5c6bc169c42.
After discussion on ML, this feature can be done in other way by using
the include directive of libconfig.
A config file could be created in this way:
variables : {
@include "file1"
@include "file2"
.....
}
The commit breaks how the paramters are passed making them dependent of
the order in which the command line args are specified.
Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
Reported-by: James Hilliard <james.hilliard1@gmail.com>
CC: Ernestas Kulik <ernestas.k@iconn-networks.com>
Forwarded: not-needed
Origin: upstream
---
swugenerator/main.py | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/swugenerator/main.py b/swugenerator/main.py
index ed0c94f..fbc28f4 100644
--- a/swugenerator/main.py
+++ b/swugenerator/main.py
@@ -27,15 +27,6 @@ class InvalidSigningOption(ValueError):
"""Raised when an invalid signing option is passed via command line"""
-class UpdateAction(argparse.Action):
- def __call__(self, parser, namespace, values, option_string=None):
- cfg = getattr(namespace, self.dest, None)
- if cfg is None:
- cfg = {}
- cfg.update(*values)
- setattr(namespace, self.dest, cfg)
-
-
def extract_keys(keyfile: str) -> Tuple[Optional[str], Optional[str]]:
"""Extracts encryption key and initialization vector (IV)
@@ -312,13 +303,10 @@ def parse_args(args: List[str]) -> None:
help="SWU output file",
)
- parser.register("action", "update", UpdateAction)
parser.add_argument(
"-c",
"--config",
default={},
- action="update",
- nargs="*",
type=parse_config_file,
help="configuration file",
)
|