Skip to content

Add multi arch support

Fredrik Gustafsson requested to merge fredrigu/apk-tools:multiarch into master
Add multi arch support

Architectures are not either A or B but are more like a tree in
relation. That is one architecture can contain an other. An easy
example here is a package with only shell scripts that should
have the architecture 'none', 'all' or something like that while
a binary package might have 'amd64'. In this example apk should
be able to install packages from both 'none' and 'amd64'

Today apk only support one architecture and has an option for
rewriting the architecture upon creating a repo index
( --rewrite-arch ARCH  ). This change makes it possible to have
one repository for each architecture and then mix different
architectures in the same installation.

This means:
* /etc/apk/arch can no contain a list of architectures supported.
* the --arch argument can be specified multiple times to add new
  architectures to /etc/apk/arch

This will make it possible for architectures to share common
repository, which will ease maintenance of different architectures
as well as improve storage requirements for hosting repos. It will
also make it easier to use apk in yocto.

The downside is that apk needs to look at at most, number of
architectures, places for a package.

index: add argument --no-warn-if-no-providers

When creating an index apk warns if a dependency is missing a provider.
However when using a multi-arch repository, it's not an error that
a certain architecture is missing a dependency because that dependency
could be in an other architecture. Since apk index doesn't know about
this, add an argument to disable that warning.
Edited by Fredrik Gustafsson

Merge request reports