]> git.ipfire.org Git - pbs.git/commitdiff
packages: Drop old copy/move functions
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jun 2022 09:45:33 +0000 (09:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jun 2022 09:45:33 +0000 (09:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/packages.py

index f65e2892be90b1a02703dd23b8920857a3fbf588..1ea841cbe4c62ee97d963d62e946498e65268738 100644 (file)
@@ -371,33 +371,6 @@ class Package(base.DataObject):
                # Store the path
                self._set_attribute("path", path)
 
-       def copy(self, dst):
-               if os.path.isdir(dst):
-                       dst = os.path.join(dst, self.filename)
-
-               if os.path.exists(dst):
-                       raise IOError("Destination file exists: %s" % dst)
-
-               src = os.path.join(PACKAGES_DIR, self.path)
-
-               log.debug("Copying %s to %s" % (src, dst))
-
-               shutil.copy2(src, dst)
-
-       def move(self, target_dir):
-               # Create directory if it does not exist, yet.
-               if not os.path.exists(target_dir):
-                       os.makedirs(target_dir)
-
-               # Make full path where to put the file.
-               target = os.path.join(target_dir, os.path.basename(self.path))
-
-               # Copy the file to the target directory (keeping metadata).
-               shutil.move(self.path, target)
-
-               # Update file path in the database.
-               self._set_attribute("path", os.path.relpath(target, PACKAGES_DIR))
-
        @lazy_property
        def build(self):
                if self.job: