forked from Mirror/pmbootstrap
pmb.build.is_necessary: fix case with Alpine's pkg (!1904)
No build is necessary if pmaport can't be built for given arch. pmbootstrap must use Alpine's binary package in that case, even if the pmaport version is higher than Alpine's binary package version. Fixes: #1897
This commit is contained in:
parent
44cb06d345
commit
b4a05cbcfb
2 changed files with 19 additions and 0 deletions
|
@ -73,3 +73,15 @@ def test_build_is_necessary_no_binary_available(args):
|
|||
aport = pmb.helpers.pmaports.find(args, "hello-world")
|
||||
apkbuild = pmb.parse.apkbuild(args, aport + "/APKBUILD")
|
||||
assert pmb.build.is_necessary(args, None, apkbuild, indexes) is True
|
||||
|
||||
|
||||
def test_build_is_necessary_cant_build_pmaport_for_arch(args):
|
||||
""" pmaport version is higher than Alpine's binary package, but pmaport
|
||||
can't be built for given arch. (#1897) """
|
||||
|
||||
apkbuild = {"pkgname": "alpine-base",
|
||||
"arch": "armhf", # can't build for x86_64!
|
||||
"pkgver": "9999",
|
||||
"pkgrel": "0"}
|
||||
assert pmb.build.is_necessary(args, "x86_64", apkbuild) is False
|
||||
assert pmb.build.is_necessary(args, "armhf", apkbuild) is True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue