From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ion38-0002H4-6M for ptxdist@pengutronix.de; Tue, 07 Jan 2020 12:29:26 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1ion37-0007Xd-TN for ptxdist@pengutronix.de; Tue, 07 Jan 2020 12:29:25 +0100 Date: Tue, 7 Jan 2020 12:29:25 +0100 From: Michael Olbrich Message-ID: <20200107112925.dgsji42ypraj5mvm@pengutronix.de> References: <20200102115336.qk5trtwu3zaz5wb4@pengutronix.de> <20200102151512.6t6fm44xt4nggzjq@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] How to express a dependency that can be satisfied by alternative packages List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de On Tue, Jan 07, 2020 at 12:11:19PM +0100, Guillermo Rodriguez Garcia wrote: > El jue., 2 ene. 2020 a las 16:15, Michael Olbrich > () escribi=F3: > > On Thu, Jan 02, 2020 at 12:53:36PM +0100, Roland Hieber wrote: > > > On Mon, Dec 16, 2019 at 07:23:13PM +0100, Guillermo Rodriguez Garcia = wrote: > > > > Let's say I have a package that requires a specific cmd line utility > > > > (e.g. openvt). > > > > This can be provided by two different packages (e.g. busybox or kbd) > > > > How to express that dependency in the .in file of my package ? > > > > > > PTXdist (or rather kconfig) does not have a notion of "provides" or > > > metapackages. I think is currently no way other than making a choice > > > option that selects the one or the other, or letting your config opti= on > > > deoend on BUSYBOX_OPENVT || KBD_OPENVT. In the latter case it is > > > probably good to add a comment above it that depends on the opposite > > > value notifying the user that neither one of them is selected (see the > > > comment above IPTABLES_INSTALL_IPTABLES_APPLY in iptables.in for > > > example). > > > > Actually, the correct way to do this is probably: > > > > select KBD if !BUSYBOX_OPENVT && RUNTIME > > select KBD_OPENVT if !BUSYBOX_OPENVT && RUNTIME > = > What is exactly the meaning of RUNTIME? Why is it needed here? This means, that kbd is only needed at runtime and not at buildtime. This relaxes the build dependencies a bit and allows more parallelization. It's really only needed for the first line, but we add it to both for consistency reasons. > Apart from that. What about the following: > = > select KBD if !BUSYBOX > select KBD_OPENVT if !BUSYBOX > select BUSYBOX_OPENVT if BUSYBOX && !KBD_OPENVT > = > This would prefer the Busybox version of openvt if none is explicitly > selected and Busybox is already present (thus avoiding to pull in the > kbd package if we can avoid it) Does that work? kconfig sometimes produces circular dependency errors, even if they don't really exist. If it works, then that's ok too (with the '&& RUNTIME' added). Michael -- = Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de