Fix: package gets rebuilt, even if it exists, when using default arch (#881)

When not specifying an architecture for `pmbootstrap build`, and the `APKBUILD`
says that it can't be built for the native arch, it gets built for the right
foreign arch. `pmbootstrap` did not properly detect if packages were already
built in that case, and tried to build them again.

(I've noticed that while building packages for the binary repo #871.)

Use any `linux-` package, that is not available for `x86_64` on a `x86_64` PC
and build it twice. It should get properly detected now:

```shell
pmbootstrap build linux-amazon-thor
pmbootstrap build linux-amazon-thor # should not get built again
```
This commit is contained in:
Oliver Smith 2017-11-07 23:23:55 +00:00 committed by GitHub
parent 93a122cd24
commit c96da8cd37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ def package(args, pkgname, carch, force=False, buildinfo=False, strict=False):
suffix)
# Skip already built versions
if not force and not pmb.build.is_necessary(args, carch, apkbuild):
if not force and not pmb.build.is_necessary(args, carch_buildenv, apkbuild):
return
# Initialize build environment, install/build makedepends