From: "Michał Górny" <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
Date: Thu, 21 Jun 2012 21:55:41 +0200 [thread overview]
Message-ID: <20120621215541.1ef6daa9@pomiocik.lan> (raw)
In-Reply-To: <4FE3708A.1090602@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 2889 bytes --]
On Thu, 21 Jun 2012 20:05:46 +0100
David Leverton <levertond@googlemail.com> wrote:
> Michał Górny wrote:
> > Hello,
> >
> > A simple solution to a program long-unsolved. In GLEP form.
>
> Just a couple of minor points/nitpicks:
>
> 1) If an installed package has both IUSE_RUNTIME and REQUIRED_USE,
> should REQUIRED_USE be re-verified:
>
> 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?
>
> 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:
>
> app-text/docmangler:
>
> # links to poppler to handle PDFs, and can use Ghostscript for
> # PostScript support if available
> IUSE="postscript"
> IUSE_RUNTIME="postscript"
> DEPEND="app-text/poppler"
> RDEPEND="${DEPEND}
> postscript? ( app-text/ghostscript )"
>
> app-misc/coolapp:
>
> IUSE="doc"
> # if Ghostscript is installed, docmangler uses it for both
> # PostScript and PDF files, but Ghostscript misrenders our PDFs
> DEPEND="doc? ( app-text/docmangler[-postscript] )"
>
> Here, the [-postscript] dep would force the user to disable that
> flag, but it wouldn't do much good because Ghostscript would still be
> 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.
>
> Possible solutions:
>
> 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
> sense in that case to disallow them in !foo-style conditionals in the
> 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?
>
> a) is pretty icky IMHO, especially if the flag pulls in multiple
> packages. I could live with either b) or c), but b) is less flexible
> 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).
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
next prev parent reply other threads:[~2012-06-21 19:55 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-17 20:31 [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags Michał Górny
2012-06-17 20:38 ` Ciaran McCreesh
2012-06-17 20:43 ` Michał Górny
2012-06-19 3:04 ` Brian Harring
2012-06-19 8:43 ` Michał Górny
2012-06-19 10:48 ` Ciaran McCreesh
2012-06-19 14:13 ` hasufell
2012-06-19 16:53 ` hasufell
2012-06-20 15:05 ` Marien Zwart
2012-06-20 16:57 ` hasufell
2012-06-20 17:07 ` Michał Górny
2012-06-20 17:11 ` hasufell
2012-06-20 17:24 ` Ciaran McCreesh
2012-06-20 18:53 ` Ralph Sennhauser
2012-06-21 7:29 ` Michał Górny
2012-06-21 7:30 ` Ciaran McCreesh
2012-06-21 7:42 ` Michał Górny
2012-06-21 7:41 ` Ciaran McCreesh
2012-06-21 8:54 ` Michał Górny
2012-06-21 8:56 ` Ciaran McCreesh
2012-06-22 5:04 ` Doug Goldstein
2012-06-21 19:05 ` David Leverton
2012-06-21 19:20 ` Ian Stakenvicius
2012-06-21 19:55 ` Michał Górny [this message]
2012-06-21 20:26 ` David Leverton
2012-06-21 20:41 ` Michał Górny
2012-06-21 21:32 ` David Leverton
2012-06-22 4:48 ` Zac Medico
2012-06-22 13:42 ` Ian Stakenvicius
2012-06-22 18:29 ` David Leverton
2012-06-22 21:37 ` Michał Górny
2012-06-22 6:12 ` Michał Górny
2012-06-22 6:45 ` Zac Medico
2012-06-22 7:36 ` Alec Warner
2012-06-22 16:27 ` Marien Zwart
2012-06-22 18:39 ` David Leverton
2012-09-25 15:04 ` hasufell
2012-09-25 15:10 ` Ciaran McCreesh
2012-09-25 15:17 ` hasufell
2012-09-25 15:23 ` Ciaran McCreesh
2012-09-25 15:25 ` Alexis Ballier
2012-09-25 15:30 ` hasufell
2012-09-25 15:36 ` Alexis Ballier
2012-09-25 15:43 ` hasufell
2012-09-25 15:57 ` Fabian Groffen
2012-09-25 16:02 ` hasufell
2012-09-25 16:17 ` Ciaran McCreesh
2012-09-25 15:43 ` Alexis Ballier
2012-09-25 16:00 ` Ciaran McCreesh
2012-09-25 16:19 ` Ian Stakenvicius
2012-09-25 16:25 ` Ciaran McCreesh
2012-09-25 16:40 ` Ian Stakenvicius
2012-09-25 18:03 ` [gentoo-dev] Addressing GLEP-62 itself Ian Stakenvicius
2012-09-25 18:47 ` Ian Stakenvicius
2012-09-25 18:58 ` Michał Górny
2012-09-25 19:54 ` Brian Harring
2012-09-26 6:02 ` Michał Górny
2012-09-26 10:29 ` Brian Harring
2012-09-26 17:38 ` Alexis Ballier
2012-09-26 21:02 ` Brian Harring
2012-09-26 21:35 ` hasufell
2012-09-26 22:25 ` Alexis Ballier
2012-09-27 19:53 ` Brian Harring
2012-09-27 20:13 ` Zac Medico
2012-09-27 20:30 ` Ian Stakenvicius
2012-09-27 20:52 ` Zac Medico
2012-09-29 9:55 ` Michał Górny
2012-09-30 21:15 ` Brian Harring
2012-09-25 18:55 ` Michał Górny
2012-09-25 16:20 ` [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags Michał Górny
2012-09-25 16:30 ` Ciaran McCreesh
2012-09-26 1:49 ` [gentoo-dev] " Duncan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120621215541.1ef6daa9@pomiocik.lan \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=levertond@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox