]> git.ipfire.org Git - pakfire.git/blobdiff - pakfire/repository/local.py
Fix composing of source packages on the server.
[pakfire.git] / pakfire / repository / local.py
index 00d3f84b519e0743815071b4ce4bfd9c76dcf546..72445a693193650ae66ebf10fff803385e16c738 100644 (file)
@@ -15,15 +15,23 @@ import pakfire.util as util
 from pakfire.constants import *
 
 class RepositoryDir(base.RepositoryFactory):
-       def __init__(self, pakfire, name, description, path):
+       def __init__(self, pakfire, name, description, path, type="binary"):
                base.RepositoryFactory.__init__(self, pakfire, name, description)
 
                # Path to files.
                self.path = path
 
+               # Save type.
+               assert type in ("binary", "source",)
+               self.type = type
+
                # Create index
                self.index = index.IndexDir(self.pakfire, self)
 
+       def remove(self):
+               self.index.clear()
+               util.rm(self.path)
+
        @property
        def priority(self):
                """