summaryrefslogtreecommitdiffstats
path: root/src/retrace/retrace.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/retrace/retrace.py')
-rw-r--r--src/retrace/retrace.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/retrace/retrace.py b/src/retrace/retrace.py
index 46adb740..cc67f62f 100644
--- a/src/retrace/retrace.py
+++ b/src/retrace/retrace.py
@@ -25,6 +25,10 @@ RELEASE_PARSERS = {
"fedora": re.compile("^Fedora[^0-9]+([0-9]+)[^\(]\(([^\)]+)\)$"),
}
+GUESS_RELEASE_PARSERS = {
+ "fedora": re.compile("\.fc([0-9]+)"),
+}
+
TASKPASS_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
CONFIG_FILE = "/etc/abrt/retrace.conf"
@@ -109,6 +113,14 @@ def guess_arch(coredump_path):
return None
+def guess_release(package):
+ for distro in GUESS_RELEASE_PARSERS.keys():
+ match = GUESS_RELEASE_PARSERS[distro].search(package)
+ if match:
+ return distro, match.group(1)
+
+ return None, None
+
def gen_task_password(taskdir):
generator = random.SystemRandom()
taskpass = ""