]> git.ipfire.org Git - pakfire.git/commitdiff
Drop old repository template code
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Feb 2021 16:58:36 +0000 (16:58 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Feb 2021 16:58:36 +0000 (16:58 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/pakfire/repository/base.py [deleted file]

index 94074048d267d8d4f4a7a8a34984d8eed9bf1236..7d6272c9d00cf9e575039e5c5fa86d3335ac9d2a 100644 (file)
@@ -157,7 +157,6 @@ pakfire_packagesdir = $(pythondir)/pakfire/packages
 
 pakfire_repository_PYTHON = \
        src/pakfire/repository/__init__.py \
-       src/pakfire/repository/base.py \
        src/pakfire/repository/metadata.py
 
 pakfire_repositorydir = $(pythondir)/pakfire/repository
diff --git a/src/pakfire/repository/base.py b/src/pakfire/repository/base.py
deleted file mode 100644 (file)
index ded31c5..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/python
-###############################################################################
-#                                                                             #
-# Pakfire - The IPFire package management system                              #
-# Copyright (C) 2011 Pakfire development team                                 #
-#                                                                             #
-# This program is free software: you can redistribute it and/or modify        #
-# it under the terms of the GNU General Public License as published by        #
-# the Free Software Foundation, either version 3 of the License, or           #
-# (at your option) any later version.                                         #
-#                                                                             #
-# This program is distributed in the hope that it will be useful,             #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
-# GNU General Public License for more details.                                #
-#                                                                             #
-# You should have received a copy of the GNU General Public License           #
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
-#                                                                             #
-###############################################################################
-
-import logging
-log = logging.getLogger("pakfire")
-
-from .. import _pakfire
-
-from . import packages
-
-class RepositoryFactory(_pakfire.Repo):
-       def __init__(self, pakfire, name, description, **kwargs):
-               self.pakfire = pakfire
-
-               # Inherit
-               _pakfire.Repo.__init__(self, self.pakfire, name)
-
-               # Save description
-               self.description = description
-
-               log.debug("Initialized new repository: %s" % self)
-
-               # Marks if this repository has been opened.
-               self.opened = False
-
-               self.init(**kwargs)
-
-       def __repr__(self):
-               return "<%s %s>" % (self.__class__.__name__, self.name)
-
-       def init(self, **kwargs):
-               pass # To be overwritten by inheriting classes
-
-       @property
-       def local(self):
-               """
-                       Say if a repository is a local one or remotely located.
-
-                       Used to check if we need to download files.
-               """
-               return False
-
-       def open(self):
-               """
-                       Opens the repository, so we can work with the data.
-               """
-               self.opened = True
-
-       def close(self):
-               """
-                       Close and delete all resources that are used by this repository.
-               """
-               self.opened = False
-
-       def dump(self, long=False, filelist=False):
-               dumps = []
-               # Dump all package information of the packages in this repository.
-               for pkg in self:
-                       dump = pkg.dump(int=int, filelist=filelist)
-                       dumps.append(dump)
-
-               return "\n\n".join(dumps)