summaryrefslogtreecommitdiffstats
path: root/mga-advisor.py
diff options
context:
space:
mode:
Diffstat (limited to 'mga-advisor.py')
-rw-r--r--mga-advisor.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/mga-advisor.py b/mga-advisor.py
index bd50ef5..173894d 100644
--- a/mga-advisor.py
+++ b/mga-advisor.py
@@ -292,16 +292,17 @@ class Widget(QWidget):
# retrieve information with repo, release from package name
cmd = ["mgarepo", "rpmlog"]
sources = []
- for mga_release in range(8,10):
+ for mga_release in range(9,10):
source = {}
repo = ""
p = run(cmd + [f"{mga_release}/{package}"], capture_output=True, text=True)
if p.returncode == 0:
# example to parse : * Tue Aug 15 2023 squidf <squidf> 116.0.5845.96-1.mga9.tainted
line1 = p.stdout.split('\n')[0]
- analyze = re.search(r"^\*.*\s(\w*[\.\d]+)-([\.\d]+)", line1)
+ analyze = re.search(r"^\*.*\s(\w*[:\.\d]+)-([\.\d]+)", line1)
if analyze is not None:
- version = analyze.group(1)
+ # get version, remove epoch
+ version = analyze.group(1).split(":")[-1]
release = analyze.group(2)[:-1]
source["mga_release"] = str(mga_release)
source['package'] = package
@@ -313,7 +314,7 @@ class Widget(QWidget):
if first:
first = False
else:
- analyze = re.search(r"^\*.*\s(\w*[\.\d]+)-([\.\d]+).mga\d*(.*)", line)
+ analyze = re.search(r"^\*.*\s(\w*[:\.\d]+)-([\.\d]+).mga\d*(.*)", line)
if analyze is not None:
if analyze.group(3):
source["repo"] = analyze.group(3)[1:]