summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gnome_module.py')
-rw-r--r--modules/gnome_module.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/gnome_module.py b/modules/gnome_module.py
index 7280a16..a66d305 100644
--- a/modules/gnome_module.py
+++ b/modules/gnome_module.py
@@ -101,11 +101,15 @@ class GNOME:
if data[0] != 4:
print("Warning: unknown cache.json version for package %s" % name)
continue
- if pkg.major_minor not in data[3]:
- print("Warning: can't find latest version for %s-%s" % (name, pkg.major_minor))
- continue
major_minor = pkg.major_minor
- if pkg.major != "0" and pkg.minor.isdigit() and int(pkg.minor) % 2 and "%s.%d" % (pkg.major, int(pkg.minor)+1) in data[3]:
+ new_versioning = False
+ if major_minor not in data[3]:
+ major_minor = pkg.major
+ new_versioning = True
+ if major_minor not in data[3]:
+ print("Warning: can't find latest version for %s-%s" % (name, pkg.major_minor))
+ continue
+ if not new_versioning and pkg.major != "0" and pkg.minor.isdigit() and int(pkg.minor) % 2 and "%s.%d" % (pkg.major, int(pkg.minor)+1) in data[3]:
major_minor = "%s.%d" % (pkg.major, int(pkg.minor)+1)
latest = False
# Some modules contain more than LATEST-IS-* for some reason, so we need to iterate and find the correct item instead of [0] (even though it is firsy always, but lets be future-proof)