pmbootstrap/pmb
Oliver Smith 0f15951023
Always prefer native/device arch when building (#1277)
In case the user does not specify for which arch packages should be
built with `pmbootstrap build`, we detect it automatically.

Previous logic was, that if the APKBUILD's arch is "all" or "noarch",
then prefer the native arch, and otherwise use the first one in the
list of available arches.

New behavior is, that we also check if the list of possible arches
contains the native arch (and if that fails, the device arch). If that
is the case, we return the native/device arch instead of the first one
in the list.

### Use case

The arch from `gcc-armhf` and similar packages (as generated by
`pmbootstrap aportgen`) used to be "all", but is nowadays a specific
list of arches. This means, that after updating the `gcc-armhf` and
`gcc-aarch64` packages, and calling `pmbootstrap build gcc-armhf`,
it will try to build `gcc-armhf` for `aarch64` instead of the native
architecture, because that is the first one listed.
And since compiling to `aarch64` requires `gcc-aarch64`, it will build
that for the native architecture first.

So you're asking for `gcc-armhf` and it compiles `gcc-aarch64`, which
is very confusing (see #1272).
2018-03-01 20:04:51 +00:00
..
aportgen device packages: depend on postmarketos-base (#1258) 2018-02-25 18:40:54 +00:00
build Always prefer native/device arch when building (#1277) 2018-03-01 20:04:51 +00:00
chroot Don't mark all packages as explicitly installed (#1247) 2018-02-25 20:49:47 +00:00
config Make proprietary drivers optional (1/2): pmbootstrap changes (#1254) 2018-02-24 21:49:10 +00:00
export Use default partitions in odin export if not specified in deviceinfo (#1271) 2018-02-28 01:28:36 +00:00
flasher Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
helpers Index parser: support multiple package providers (#1202) 2018-02-20 19:52:28 +00:00
install Make proprietary drivers optional (1/2): pmbootstrap changes (#1254) 2018-02-24 21:49:10 +00:00
parse qemu: allow the user to specify the kernel flavor (#1256) 2018-02-25 19:20:22 +00:00
qemu qemu: allow the user to specify the kernel flavor (#1256) 2018-02-25 19:20:22 +00:00
__init__.py pmbootstrap: Disallow running as root (#1120) 2018-01-14 08:13:35 +00:00