From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1ShMUX-0004WE-8C for garchives@archives.gentoo.org; Wed, 20 Jun 2012 15:06:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0339FE08DD; Wed, 20 Jun 2012 15:06:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CE46AE086E for ; Wed, 20 Jun 2012 15:05:45 +0000 (UTC) Received: from [192.168.1.64] (s53756b86.adsl.wanadoo.nl [83.117.107.134]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: marienz) by smtp.gentoo.org (Postfix) with ESMTPSA id CA2E11B4015 for ; Wed, 20 Jun 2012 15:05:44 +0000 (UTC) Message-ID: <1340204734.9532.15.camel@cyclops.marienz.net> Subject: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags From: Marien Zwart To: gentoo-dev@lists.gentoo.org Date: Wed, 20 Jun 2012 17:05:34 +0200 In-Reply-To: <4FE0AE7E.6030306@gentoo.org> References: <20120617223159.4e565741@pomiocik.lan> <4FE0AE7E.6030306@gentoo.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 3cccb24d-affb-45c1-8218-88e6cf2fd9e5 X-Archives-Hash: 9519f5c28cbf98ee79fea1233a00b342 On di, 2012-06-19 at 18:53 +0200, hasufell wrote: > On 06/17/2012 10:31 PM, Micha=C5=82 G=C3=B3rny wrote: > > Hello, > >=20 > > A simple solution to a program long-unsolved. In GLEP form. > >=20 > > Both attached and published as a gist: > >=20 > > https://gist.github.com/2945569 > >=20 > > (please note that github doesn't render GLEP headers correctly) > >=20 >=20 > As already stated I like this idea, because I already got some optional > dep bloat in x11-misc/spacefm and media-sound/gmusicbrowser. >=20 > However I have a few objections: >=20 > 1. Optional deps are SUGGESTIONS from the dev which he considered > nice/good/sane at the time of writing the ebuild. Other people might > totally disagree with those suggestions. > As useflags in IUSE_RUNTIME can pick from global useflags as well or > even set "+foo" the user might have a hard time to turn off things he > does not want without turning them off for regular IUSE as well. I think we're not all agreeing on which problem is being solved here. I see IUSE_RUNTIME as an improvement for packages that have a runtime dependency on another package to provide a certain feature, but no way of turning this feature off at build time. Examples of this kind of dependency are executables or python imports, where the executable or library being absent is dealt with at runtime. For such packages putting the dependency behind a USE flag makes sense, and for other packages to depend on the package with that USE flag set also makes sense. This already works today. However, if you originally built the package with the USE flag off, and now try to install something that depends on the package with the USE flag on, you force a rebuild. That's not so nice, as there's no change to the installed package at all: the rebuild is a waste of time. IUSE_RUNTIME allows the package manager to skip that rebuild, as it now knows it is unnecessary. What you are describing is more like "suggested" dependencies. Those may also be useful, but do not solve quite the same problem. I do not think they quite replace the USE flag-based approach described above, as it makes sense for other ebuilds to depend on "foo with support for feature blah" through the "blah" USE flag without all those other packages having to know which specific dependencies this adds to foo, or whether foo needs a rebuild to enable the feature or not. Also, even in packages in which IUSE_RUNTIME is used for something like "suggested" dependencies it is not terribly hard for the user to turn the USE flag off (package.use) and install the interesting bits by hand. > 2. Afais useflags that are already in IUSE and used for build-time stuf= f > must not be used for IUSE_RUNTIME too. > This is a random rule IMO. I don't have many cases in mind where this > would be annoying (could think of "debug" enabling some in-source > switches and adding optional debug tools in RDEPEND. Having one flag > here would make it cleaner and tighter for the user to interact with > useflags.). > However... this is not a logical rule, rather a technical issue. If > there is a way to avoid this restriction that would be nice. I do not see where you are going with this. If it makes sense to turn on the build-time support for a feature without installing all the dependencies then the extra dependencies should go behind a separate USE flag (and that separate USE flag may depend on the USE flag controlling the build-time support using REQUIRED_USE). Or perhaps the additional dependencies should be in some new kind of "suggested" depend. > 3. There are no unconditional optional deps possible. > ssuominen had an example: > "virtualx.eclass could have suggestion/recommendation to enable USE=3Dx= vfb > in x11-base/xorg-server" I do not see where you are going with this. Can you refer me to where this suggestion was made? virtualx.eclass adds a hard dependency if the test USE flag (or some other USE flag) is set, and no dependency if this USE flag is not set. When would virtualx.eclass add an optional dependency? --=20 Marien Zwart