diff options
author | Michal Toman <mtoman@redhat.com> | 2011-03-23 11:19:01 +0100 |
---|---|---|
committer | Michal Toman <mtoman@redhat.com> | 2011-03-23 11:19:01 +0100 |
commit | dc42378d86f3cc7416c3c9eca3dd331f3f8e59da (patch) | |
tree | 684d9443cf787becdf4e103edf3aa68202690040 /src/retrace/plugins | |
parent | 7de7895acbd189a0be5212583d78dacecd6984db (diff) | |
download | abrt-dc42378d86f3cc7416c3c9eca3dd331f3f8e59da.tar.gz abrt-dc42378d86f3cc7416c3c9eca3dd331f3f8e59da.tar.xz abrt-dc42378d86f3cc7416c3c9eca3dd331f3f8e59da.zip |
retrace server: make reposync pluginable
Diffstat (limited to 'src/retrace/plugins')
-rw-r--r-- | src/retrace/plugins/__init__.py | 24 | ||||
-rw-r--r-- | src/retrace/plugins/fedora.py | 29 |
2 files changed, 53 insertions, 0 deletions
diff --git a/src/retrace/plugins/__init__.py b/src/retrace/plugins/__init__.py new file mode 100644 index 00000000..5c041b0c --- /dev/null +++ b/src/retrace/plugins/__init__.py @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import os + +PLUGIN_DIR = "/usr/share/abrt-retrace/plugins" +PLUGINS = [] + +try: + files = os.listdir(PLUGIN_DIR) +except Exception as ex: + print "Unable to list directory '%s': %s" % (PLUGIN_DIR, ex) + raise ImportError, ex + +for filename in files: + if not filename.startswith("_") and filename.endswith(".py"): + pluginname = filename.replace(".py", "") + try: + this = __import__("%s.%s" % (__name__, pluginname)) + except: + continue + + plugin = this.__getattribute__(pluginname) + if plugin.__dict__.has_key("distribution") and plugin.__dict__.has_key("repos"): + PLUGINS.append(plugin) diff --git a/src/retrace/plugins/fedora.py b/src/retrace/plugins/fedora.py new file mode 100644 index 00000000..d4b43fc7 --- /dev/null +++ b/src/retrace/plugins/fedora.py @@ -0,0 +1,29 @@ +#!/usr/bin/python + +import re + +distribution = "fedora" +abrtparser = re.compile("^Fedora release ([0-9]+) \(([^\)]+)\)$") +guessparser = re.compile("\.fc([0-9]+)") +repos = [ + [ + "rsync://ftp.sh.cvut.cz/fedora/linux/releases/$VER/Everything/$ARCH/os/Packages/*", + "rsync://ftp.sh.cvut.cz/fedora/linux/development/$VER/Everything/$ARCH/os/Packages/*", + ], + [ + "rsync://ftp.sh.cvut.cz/fedora/linux/releases/$VER/Everything/$ARCH/debug/*", + "rsync://ftp.sh.cvut.cz/fedora/linux/development/$VER/Everything/$ARCH/debug/*", + ], + [ + "rsync://ftp.sh.cvut.cz/fedora/linux/updates/$VER/$ARCH/*", + ], + [ + "rsync://ftp.sh.cvut.cz/fedora/linux/updates/$VER/$ARCH/debug/*", + ], + [ + "rsync://ftp.sh.cvut.cz/fedora/linux/updates/testing/$VER/$ARCH/*", + ], + [ + "rsync://ftp.sh.cvut.cz/fedora/linux/updates/testing/$VER/$ARCH/debug/*", + ], +] |