pmbootstrap/pmb/parse
Minecrell 3ebb994206
pmb.parse: Respect provider_priority if multiple providers exist (MR 1945)
Alpine APKBUILDs have the concept of "provider priorities" that affect
the choice of the provider to install when multiple packages provide
a virtual package.

One use case for this is to allow installation of different firmware
versions. bq-paella can run unsigned firmware, therefore you have the
choice between using the original firmware from the manufacturer, or
a slightly newer version from Qualcomm for the Dragonboard 410c.

We add provides="firmware-qcom-msm8916-wcnss" (the "virtual package")
to both firmware-qcom-db410c-wcnss and firmware-bq-picmt-wcnss.
At this point, attempting to install "firmware-qcom-msm8916-wcnss"
would still fail with apk. (Because it does not know which provider
to install.)

To pick a default we can set e.g. provider_priority=100 for
firmware-qcom-db410c-wcnss (the slightly newer version).
In that case, firmware-qcom-db410c-wcnss should be installed by default.

However, the user can choose to do "apk add firmware-bq-picmt-wcnss"
to override the default choice in case of problems. In that case,
the conflicting firmware-qcom-db410c-wcnss will be automatically removed.

At the moment, pmbootstrap does not respect the "provider_priority" at all.
In the above case, it would always install "firmware-bq-picmt-wcnss"
during "pmbootstrap install" since that has the shortest name.

Extend the pmbootstrap code to pick a provider with the highest priority
(if any of the providers has a priority set).
2020-06-16 01:31:28 +03:00
..
__init__.py Cosmetic: use SPDX license header (!1877) 2020-02-24 03:11:10 +03:00
_apkbuild.py pmb.parse._apkbuild: decrease log verbosity (!1897) 2020-03-29 15:15:55 +02:00
apkindex.py pmb.parse: Respect provider_priority if multiple providers exist (MR 1945) 2020-06-16 01:31:28 +03:00
arch.py pmb.qemu: use current device instead of requiring --arch (!1886) 2020-03-14 08:05:32 +01:00
arguments.py pmbootstrap chroot --xauth: new option (MR 1944) 2020-06-09 04:10:51 +02:00
binfmt_info.py Cosmetic: use SPDX license header (!1877) 2020-02-24 03:11:10 +03:00
bootimg.py Cosmetic: use SPDX license header (!1877) 2020-02-24 03:11:10 +03:00
depends.py pmb.parse: Respect provider_priority if multiple providers exist (MR 1945) 2020-06-16 01:31:28 +03:00
deviceinfo.py pmb.parse.deviceinfo.sanity_check: verify chassis (MR 1933) 2020-05-24 08:38:43 +02:00
kconfig.py pmb.parse.kconfig: implement anbox kconfig check (MR 1916) 2020-05-24 04:42:01 +02:00
version.py Cosmetic: use SPDX license header (!1877) 2020-02-24 03:11:10 +03:00