summarylogtreecommitdiffstats
path: root/update.py
diff options
context:
space:
mode:
authorchrisjbillington2021-11-01 15:58:51 +1100
committerchrisjbillington2021-11-01 15:58:51 +1100
commit3c017d89a4ced3c586d94df6d58352e1ebac2b2e (patch)
treef51dff8512d11f292ccd36940caf0d6242de93dd /update.py
parentefee675565dde55ff1f47733bb420eff38845a5c (diff)
downloadaur-3c017d89a4ced3c586d94df6d58352e1ebac2b2e.tar.gz
Fix bug where update doesn't work properly
When the package is updated in the repos, but the info not available on archlinux.org. Not sure why this would occur, but it happened with linux-zen today.
Diffstat (limited to 'update.py')
-rw-r--r--update.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/update.py b/update.py
index 9b698b0f8605..2630df1fc3e7 100644
--- a/update.py
+++ b/update.py
@@ -88,8 +88,15 @@ def update():
subprocess.check_call(['git', 'push'])
if __name__ == '__main__':
- if get_current() == get_latest():
- print(f"{NAME}-versioned-bin is up to date")
+ current_version = get_current()
+ latest_version = get_latest()
+ if current_version != latest_version:
+ info = get_info(NAME)
+ archlinux_dot_org_version = f"{info['pkgver']}-{info['pkgrel']}"
+ if archlinux_dot_org_version == latest_version:
+ print(f"{NAME}-versioned-bin is out of date!")
+ update()
+ else:
+ print(f"{NAME}-versioned-bin is out of date, but not yet on archlinux.org")
else:
- print(f"{NAME}-versioned-bin is out of date!")
- update()
+ print(f"{NAME}-versioned-bin is up to date")