]> git.ipfire.org Git - pakfire.git/commitdiff
daemon: Drop checking buildroot
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Jun 2021 10:45:22 +0000 (10:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Jun 2021 10:45:22 +0000 (10:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/daemon.py
src/pakfire/system.py

index 87aab8fec5d15c2139577fa40beb606aa77dca78..871f2bafe3a302ad2e09651af5e652b6a8d516ae 100644 (file)
@@ -388,11 +388,6 @@ class PakfireWorker(multiprocessing.Process):
                self.register_signal_handlers()
 
                while self.__running:
-                       # Check if the build root is file.
-                       if not self.check_buildroot():
-                               time.sleep(60)
-                               continue
-
                        # Try to get a new build job.
                        job = self.get_new_build_job()
                        if not job:
@@ -435,28 +430,6 @@ class PakfireWorker(multiprocessing.Process):
                """
                self.shutdown()
 
-       def check_buildroot(self):
-               """
-                       Checks if the buildroot is fine.
-               """
-               mp = system.get_mountpoint(BUILD_ROOT)
-
-               # Check if the mountpoint is read-only.
-               if mp.is_readonly():
-                       log.warning("Build directory is read-only: %s" % BUILD_ROOT)
-
-                       # Trying to remount.
-                       try:
-                               mp.remount("rw")
-                       except:
-                               log.warning("Remounting (rw) %s has failed" % BUILD_ROOT)
-                               return False
-                       else:
-                               log.warning("Successfully remounted as rw: %s" % BUILD_ROOT)
-
-               # Everything looks fine.
-               return True
-
        def get_new_build_job(self, timeout=600):
                log.debug("Requesting new job...")
 
index 337a9563d05306ce3ef8b61287e7d9f4a9b8499c..a5362abbf4fef12a7096f072d4e8269a25f78692 100644 (file)
@@ -167,9 +167,6 @@ class System(object):
 
                return meminfo.get("SwapFree", None)
 
-       def get_mountpoint(self, path):
-               return Mountpoint(path)
-
 
 # Create an instance of this class to only keep it once in memory.
 system = System()