phase1: remove checkBuiltin deadcode
authorThibaut VARÈNE <hacks@slashdirt.org>
Wed, 19 Oct 2022 17:57:18 +0000 (19:57 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 15:36:01 +0000 (17:36 +0200)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
phase1/master.cfg

index 16817d4932fa5236287fa138e616081faedee0df..8c708d293162c9530898aa497155174b74b950e1 100644 (file)
@@ -574,59 +574,6 @@ c['builders'] = []
 
 dlLock = locks.WorkerLock("worker_dl")
 
-checkBuiltin = re.sub('[\t\n ]+', ' ', """
-       checkBuiltin() {
-               local symbol op path file;
-               for file in $CHANGED_FILES; do
-                       case "$file" in
-                               package/*/*) : ;;
-                               *) return 0 ;;
-                       esac;
-               done;
-               while read symbol op path; do
-                       case "$symbol" in package-*)
-                               symbol="${symbol##*(}";
-                               symbol="${symbol%)}";
-                               for file in $CHANGED_FILES; do
-                                       case "$file" in "package/$path/"*)
-                                               grep -qsx "$symbol=y" .config && return 0
-                                       ;; esac;
-                               done;
-                       esac;
-               done < tmp/.packagedeps;
-               return 1;
-       }
-""").strip()
-
-
-class IfBuiltinShellCommand(ShellCommand):
-       def _quote(self, str):
-               if re.search("[^a-zA-Z0-9/_.-]", str):
-                       return "'%s'" %(re.sub("'", "'\"'\"'", str))
-               return str
-
-       def setCommand(self, command):
-               if not isinstance(command, (str, unicode)):
-                       command = ' '.join(map(self._quote, command))
-               self.command = [
-                       '/bin/sh', '-c',
-                       '%s; if checkBuiltin; then %s; else exit 0; fi' %(checkBuiltin, command)
-               ]
-
-       def setupEnvironment(self, cmd):
-               workerEnv = self.workerEnvironment
-               if workerEnv is None:
-                       workerEnv = { }
-               changedFiles = { }
-               for request in self.build.requests:
-                       for source in request.sources:
-                               for change in source.changes:
-                                       for file in change.files:
-                                               changedFiles[file] = True
-               fullSlaveEnv = workerEnv.copy()
-               fullSlaveEnv['CHANGED_FILES'] = ' '.join(changedFiles.keys())
-               cmd.args['env'] = fullSlaveEnv
-
 workerNames = [ ]
 
 for worker in c['workers']:
@@ -1015,7 +962,6 @@ for target in targets:
                haltOnFailure = True
        ))
 
-       # factory.addStep(IfBuiltinShellCommand(
        factory.addStep(ShellCommand(
                name = "pkginstall",
                description = "Installing packages",
@@ -1032,7 +978,6 @@ for target in targets:
                haltOnFailure = True
        ))
 
-       #factory.addStep(IfBuiltinShellCommand(
        factory.addStep(ShellCommand(
                name = "images",
                description = "Building and installing images",