diff options
author | chrisjbillington | 2021-11-01 15:58:37 +1100 |
---|---|---|
committer | chrisjbillington | 2021-11-01 15:58:37 +1100 |
commit | 5a628319c584a4f672ebdc734d99184fb18dcb62 (patch) | |
tree | 400b1847b07f1e9029ba406ac4eabee87ea4b8ce /update.py | |
parent | 4085f3bd33792d5d6d63a60ab84500e76a93bd60 (diff) | |
download | aur-5a628319c584a4f672ebdc734d99184fb18dcb62.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 today.
Diffstat (limited to 'update.py')
-rw-r--r-- | update.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/update.py b/update.py index 85399917619b..26add73618c8 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") |