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 <gentoo-dev+bounces-52786-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1ShnTR-00054l-1z
	for garchives@archives.gentoo.org; Thu, 21 Jun 2012 19:55:25 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 189D6E0C9E;
	Thu, 21 Jun 2012 19:55:00 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 9AD96E081C
	for <gentoo-dev@lists.gentoo.org>; Thu, 21 Jun 2012 19:54:17 +0000 (UTC)
Received: from pomiocik.lan (77-255-5-90.adsl.inetia.pl [77.255.5.90])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	(Authenticated sender: mgorny)
	by smtp.gentoo.org (Postfix) with ESMTPSA id C35501B4001;
	Thu, 21 Jun 2012 19:54:15 +0000 (UTC)
Date: Thu, 21 Jun 2012 21:55:41 +0200
From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: levertond@googlemail.com
Subject: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via
 runtime-switchable USE flags
Message-ID: <20120621215541.1ef6daa9@pomiocik.lan>
In-Reply-To: <4FE3708A.1090602@googlemail.com>
References: <20120617223159.4e565741@pomiocik.lan>
	<4FE3708A.1090602@googlemail.com>
Organization: Gentoo
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=PGP-SHA256;
 boundary="Sig_/GjTZtQKGfkyeI14d5K=hkmp"; protocol="application/pgp-signature"
X-Archives-Salt: fd163e79-53e8-42c3-8ee4-afdccc429d1c
X-Archives-Hash: be5ce01c2f64eb092d03897216a1da00

--Sig_/GjTZtQKGfkyeI14d5K=hkmp
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Thu, 21 Jun 2012 20:05:46 +0100
David Leverton <levertond@googlemail.com> wrote:

> Micha=C5=82 G=C3=B3rny wrote:
> > Hello,
> >
> > A simple solution to a program long-unsolved. In GLEP form.
>=20
> Just a couple of minor points/nitpicks:
>=20
> 1) If an installed package has both IUSE_RUNTIME and REQUIRED_USE,=20
> should REQUIRED_USE be re-verified:
>=20
> a) for every dep resolution
> b) when the package is involved in the resolution for some other
> reason (not necessarily being reinstalled, just when the resolver has
> some reason to look at it)
> c) something else?
>=20
> I think b) should be sufficient (and probably easier to implement),
> but is there any reason why it wouldn't be?

Well, I don't understand the difference between a) and b) in your case
but the idea is that REQUIRED_USE should be re-verified if either
enabled USE flag list or REQUIRED_USE changes.

> 2) It's not forbidden for package A to depend on an IUSE_RUNTIME flag
> of package B being disabled, but it's unlikely to be useful.  To make
> this more concrete, a fictional but vaguely plausible example:
>=20
> app-text/docmangler:
>=20
> # links to poppler to handle PDFs, and can use Ghostscript for
> # PostScript support if available
> IUSE=3D"postscript"
> IUSE_RUNTIME=3D"postscript"
> DEPEND=3D"app-text/poppler"
> RDEPEND=3D"${DEPEND}
>      postscript? ( app-text/ghostscript )"
>=20
> app-misc/coolapp:
>=20
> IUSE=3D"doc"
> # if Ghostscript is installed, docmangler uses it for both
> # PostScript and PDF files, but Ghostscript misrenders our PDFs
> DEPEND=3D"doc? ( app-text/docmangler[-postscript] )"
>=20
> Here, the [-postscript] dep would force the user to disable that
> flag, but it wouldn't do much good because Ghostscript would still be=20
> installed.  This doesn't happen with regular USE flags because (if
> the ebuild is written correctly) disabling the flag removes the
> feature even if its dependencies happen to be installed.
>=20
> Possible solutions:
>=20
> a) automatically rewrite the dep as
>      postscript? ( app-text/ghostscript )
>      !postscript? ( !app-text/ghostscript )
> b) forbid [-foo]-style deps for IUSE_RUNTIME flags (would also make=20
> sense in that case to disallow them in !foo-style conditionals in the=20
> dependencies of the package itself, as that could cause similar
> paradoxes) c) don't address it in the spec itself, and require people
> to manually write the dep in the blocker form if it's required
> d) something else?
>=20
> a) is pretty icky IMHO, especially if the flag pulls in multiple=20
> packages.  I could live with either b) or c), but b) is less flexible=20
> and c) leaves a potential trap for the unwary.  Any opinions?

Good observation. I think b) is the best solution since forced removal
of random dependencies is a very bad idea (and misuse of blockers).

--=20
Best regards,
Micha=C5=82 G=C3=B3rny

--Sig_/GjTZtQKGfkyeI14d5K=hkmp
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iJwEAQEIAAYFAk/jfEIACgkQfXuS5UK5QB1qwwQAlFniBEJXbITkm+xQmJIuQueU
OR0qWbhOZgMvFIG78XH9x7U/AGscppFoG5T/lyiSVMl9EGEj8z17OdAOlEV6ayyG
WXSocZLFpZi3x48BrMqjcpVU2ghY79c2t/h6TQYghO/8MX3tM/Ex5UKfSh69G9Ct
iKsJlW6LSdHYkdnCtZo=
=wrVM
-----END PGP SIGNATURE-----

--Sig_/GjTZtQKGfkyeI14d5K=hkmp--