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",
     )
