diff options
author | chrisjbillington | 2021-11-01 15:58:29 +1100 |
---|---|---|
committer | chrisjbillington | 2021-11-01 15:58:29 +1100 |
commit | 6ed66f5a12c70d52abde301bda1ebfc52b48972f (patch) | |
tree | 818d10aaa98423208d4713dd335acf1a9f94dd68 | |
parent | 0f2e4590417ae2ecb96aef7655a7d9df7320e1cf (diff) | |
download | aur-6ed66f5a12c70d52abde301bda1ebfc52b48972f.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.
-rw-r--r-- | update.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/update.py b/update.py index 1b3a01fa7000..f380687666f1 100644 --- a/update.py +++ b/update.py @@ -86,8 +86,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") |