aportgen: don't fail if binary ver < APKBUILD ver

The typical workflow for upgrading cross/gcc-* is:

$ cd pmaports/cross
$ pmbootstrap aportgen gcc-*

Currently this is failing because the APKBUILD has been updated in
Alpine for gcc, but gcc has not been built for all arches yet. This
shouldn't prevent us from generating the proper updated APKBUILDs in
pmaports so just print a note and don't fail here.

I'm committing this directly to master as this currently breaks
test/test_aportgen.py::test_aportgen.
This commit is contained in:
Oliver Smith 2022-11-02 17:58:26 +01:00
parent 6a21898ce4
commit e8b0b4ba78
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 12 additions and 12 deletions

View file

@ -127,6 +127,4 @@ def test_aportgen_get_upstream_aport(args, monkeypatch):
# APKBUILD > binary
apkbuild = {"pkgver": "3.0", "pkgrel": "0"}
package = {"version": "2.0-r0"}
with pytest.raises(RuntimeError) as e:
func(args, upstream)
assert str(e.value).startswith("You can force an update of your binary")
assert func(args, upstream) == upstream_full