diff mbox series

[07/28] moveconfig: Drop check_defconfig() and update_dotconfig()

Message ID 20230810163212.2368374-8-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show
Series moveconfig: Drop old code and tidy up | expand

Commit Message

Simon Glass Aug. 10, 2023, 4:31 p.m. UTC
These functions are not needed anymore. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/moveconfig.py | 62 ++-------------------------------------------
 1 file changed, 2 insertions(+), 60 deletions(-)
diff mbox series

Patch

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index b32a9002b18..4f9bea0827f 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -348,48 +348,6 @@  class KconfigParser:
 
         return arch
 
-    def update_dotconfig(self):
-        """Parse files for the config options and update the .config.
-
-        This function parses the generated .config and include/autoconf.mk
-        searching the target options.
-        Move the config option(s) to the .config as needed.
-
-        Args:
-          defconfig: defconfig name.
-
-        Returns:
-          Return a tuple of (updated flag, log string).
-          The "updated flag" is True if the .config was updated, False
-          otherwise.  The "log string" shows what happend to the .config.
-        """
-        updated = False
-        suspicious = False
-
-        autoconf_path = self.autoconf
-
-        dotconfig_lines = read_file(self.dotconfig)
-
-        autoconf_lines = read_file(autoconf_path)
-
-        log = ''
-
-        return (updated, suspicious, log)
-
-    def check_defconfig(self):
-        """Check the defconfig after savedefconfig
-
-        Returns:
-          Return additional log if moved CONFIGs were removed again by
-          'make savedefconfig'.
-        """
-
-        log = ''
-
-        defconfig_lines = read_file(self.defconfig)
-
-        return log
-
 
 class DatabaseThread(threading.Thread):
     """This thread processes results from Slot threads.
@@ -452,7 +410,6 @@  class Slot:
         self.parser = KconfigParser(args, self.build_dir)
         self.state = STATE_IDLE
         self.failed_boards = set()
-        self.suspicious_boards = set()
 
     def __del__(self):
         """Delete the working directory
@@ -588,20 +545,10 @@  class Slot:
 
     def do_savedefconfig(self):
         """Update the .config and run 'make savedefconfig'."""
-
-        (updated, suspicious, log) = self.parser.update_dotconfig()
-        if suspicious:
-            self.suspicious_boards.add(self.defconfig)
-        self.log += log
-
-        if not self.args.force_sync and not updated:
+        if not self.args.force_sync:
             self.finish(True)
             return
-        if updated:
-            self.log += color_text(self.args.color, COLOR_LIGHT_GREEN,
-                                   'Syncing by savedefconfig...\n')
-        else:
-            self.log += 'Syncing by savedefconfig (forced by option)...\n'
+        self.log += 'Syncing by savedefconfig (forced by option)...\n'
 
         cmd = list(self.make_cmd)
         cmd.append('savedefconfig')
@@ -611,11 +558,6 @@  class Slot:
 
     def update_defconfig(self):
         """Update the input defconfig and go back to the idle state."""
-
-        log = self.parser.check_defconfig()
-        if log:
-            self.suspicious_boards.add(self.defconfig)
-            self.log += log
         orig_defconfig = os.path.join('configs', self.defconfig)
         new_defconfig = os.path.join(self.build_dir, 'defconfig')
         updated = not filecmp.cmp(orig_defconfig, new_defconfig)