From 908cd395725372536e817e1afc1bd5186c8a4a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 3 Nov 2019 08:13:06 +0100 Subject: [PATCH] daca2-packages: improved filter for versions --- tools/daca2-getpackages.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/daca2-getpackages.py b/tools/daca2-getpackages.py index 798c555f6..f4aa8bd97 100644 --- a/tools/daca2-getpackages.py +++ b/tools/daca2-getpackages.py @@ -90,8 +90,12 @@ def getpackages(): line = line.strip() if len(line) < 4: if filename: - res1 = re.match(r'(.*)[-.][0-9.]+$', path) - res2 = re.match(r'(.*)[-.][0-9.]+$', previous_path) + res1 = re.match(r'(.*)-[0-9.]+$', path) + if res1 is None: + res1 = re.match(r'(.*)[-.][0-9.]+$', path) + res2 = re.match(r'(.*)-[0-9.]+$', previous_path) + if res2 is None: + res2 = re.match(r'(.*)[-.][0-9.]+$', previous_path) if res1 is None or res2 is None or res1.group(1) != res2.group(1): archives.append(path + '/' + filename) else: @@ -110,4 +114,5 @@ def getpackages(): for p in getpackages(): - print(p) + print(DEBIAN[0] + p) +