On 3/2/2019 12:34 PM, John Miner wrote:
> For example, when I use --depends, it provides a list of some packages and some
> modules, not all of which can be used in "apk add":
> apk info --repository /tmp/alpine/apks/ --arch armhf --depends openvpn
> openvpn-2.4.6-r4 depends on:
You are indeed noting that those virtual packages (e.g so:libssl.so.1.1)
1. You can use those in apk-add(1), for instance, see: `apk add
so:libssl.so.1.1` (but this has drawbacks)
2. The reason it works that way is because there may be multiple
packages that provide `so:libssl.so.1.1`.
3. You can find the exact list of packages that provide a given virtual
using apk-search(1). For example, `apk search -x so:libssl.so.1.1`
returns "libssl1.1-1.1.1b-r0" on my machine.
> Is there a way to use apk to get the actual package names of the dependencies
> (similar to the list that appears under "Depends" on pkgs.alpinelinux.org)? For
I suspect that the way pkgs.alpinelinux.org does it is by using the
common selection mechanism.
If multiple packages provide the same virtual, the one with the higher
version number wins out.
Of course, sometimes, this can cause issues, and so may be reworked.
> example, for the above, I would want:
This obviously doesn't work, since multiple packages can provide any
If you're fine with selecting any possible provider (as you appear to
be), you might consider a script along the following lines:
for p in $(apk info -qR $1)
apk search -qx $p | head -n 1
This, on my system prints out the following output for openvpn:
- which appears to roughly match what you desire.
For more details regarding apk, and how you might use it, consider
reading through the user documentation on it.
It's currently in-progress, and somewhat rough (unedited), but I suspect
it would still be useful to you.
Received on Sat Mar 02 2019 - 14:48:49 UTC