summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2024-01-08 19:15:23 +0100
committerPapoteur <papoteur@mageia.org>2024-01-08 19:15:23 +0100
commitf6848066dacd52aa5102dc1557ebb36dd8a66284 (patch)
treee2f639d538ca0b886af2d93a3c8480c941f1b068
parent4d67ad92fe2c8a32d4e3388ec7f88148c8b454cd (diff)
downloadmga-advisor-f6848066dacd52aa5102dc1557ebb36dd8a66284.tar
mga-advisor-f6848066dacd52aa5102dc1557ebb36dd8a66284.tar.gz
mga-advisor-f6848066dacd52aa5102dc1557ebb36dd8a66284.tar.bz2
mga-advisor-f6848066dacd52aa5102dc1557ebb36dd8a66284.tar.xz
mga-advisor-f6848066dacd52aa5102dc1557ebb36dd8a66284.zip
Do not use epoch in reported version
Do not provide mag_release 8 anymore
-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:]