X-Original-To: alpine-user@lists.alpinelinux.org Received: from mail.toastin.space (mail.toastin.space [207.246.93.162]) by lists.alpinelinux.org (Postfix) with ESMTP id 5BEC9F81484 for ; Sat, 2 Mar 2019 19:48:52 +0000 (UTC) Received: from mail.toastin.space (localhost [127.0.0.1]) by mail.toastin.space (OpenSMTPD) with ESMTP id 2f92d9d9 for ; Sat, 2 Mar 2019 14:48:51 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=toastin.space; h=subject :to:references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=ml; bh=3ItgpIq8B9z0+w fl3V5cSQnUNIA=; b=OGDsfQ6QRil0lfMaP5V+Z+wdWHrAh24kz0CThgQ9wGgRWc 2frkBD4ShfSnwxFL2YRK70PTctCMAf5dSqUjYGQu12wvOlEln7J6SvLJLkt3e38z oOZXwHhuPfxv4w1AyCfJKIjVS0WgVVBALtesDqjXxzrq0yyYXz/aRAG7XS1syzT7 rYFt4V578bImvCAUKQxVR1xxDuRAM6NVwjCnhH+yxnfWqsoOaPz76UqpWj1TgJe9 G3bESkWiPyofGjOIsDsecaaiW8S20+oGQK7VB7s3rlLwmS/m317Bldf8Jx05I/G2 U1h7jvABZCPdwa8P4oSlQi3B/2kII2jgOrJ4nnuQ== DomainKey-Signature: a=rsa-sha1; c=nofws; d=toastin.space; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; q=dns; s=ml; b=ai6RDtdy eUG803Up2x+i+klTikdG2C4224WIcgpVB27Q3u/EOm2azA8m8FrQL2bgY7bq6seg c2E1RFRElr4Cv8IIl6Md8uYeEIHw2qY33qNJLWOdkZKmKRpLQET4LFNMN41t/0mT R4v2JoHt+H094J+INlgNgGJoa8GWfR8FkCLSwWv/LfYyw7ojhp9u647yCgelkeER 0hIc1qdLF4+owzy4KHE0nsy2E5DgBinqRoYTaroJbC7Uukqzv7gfNdBvA2xH1vr9 ec4306vaIR25Ra8z+U8a8H77uOsp9q/xy9SrfuToeX76tLVxAxYFBA4R+6Rcjq/y Zgaw2fF0za0kyg== Received: from [192.168.0.135] (173-246-15-165.qc.cable.ebox.net [173.246.15.165]) by mail.toastin.space (OpenSMTPD) with ESMTPSA id 91a17116 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sat, 2 Mar 2019 14:48:50 -0500 (EST) Subject: Re: [alpine-user] apk info to get package depends? To: alpine-user@lists.alpinelinux.org References: From: Chloe Kudryavtsev Message-ID: Date: Sat, 2 Mar 2019 14:48:49 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Thunderbird/66.0 X-Mailinglist: alpine-user Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, 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: > iproute2 > /bin/sh > so:libc.musl-x86_64.so.1 > so:libcrypto.so.1.1 > so:liblzo2.so.2 > so:libssl.so.1.1 You are indeed noting that those virtual packages (e.g so:libssl.so.1.1) are virtual. However, 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: > https://pkgs.alpinelinux.org/package/edge/main/armhf/openvpn > Depends: > busybox > iproute2 > libcrypto1.1 > libssl1.1 > lzo > musl This obviously doesn't work, since multiple packages can provide any given virtual. If you're fine with selecting any possible provider (as you appear to be), you might consider a script along the following lines: ``` #!/bin/sh for p in $(apk info -qR $1) do apk search -qx $p | head -n 1 done ``` This, on my system prints out the following output for openvpn: ``` iproute2 busybox musl libcrypto1.1 lzo libssl1.1 ``` - 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[1]. It's currently in-progress, and somewhat rough (unedited), but I suspect it would still be useful to you. [1]: https://beta.docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html --- Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org Help: alpine-user+help@lists.alpinelinux.org ---