Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Michał Górny <mgorny@g.o>
Subject: Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Date: Thu, 21 Jun 2012 21:55:41 +0200
On Thu, 21 Jun 2012 20:05:46 +0100
David Leverton <levertond@...> 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:
signature.asc (PGP signature)
Replies:
Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
-- David Leverton
References:
[pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
-- Michał Górny
Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
-- David Leverton
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Next by thread:
Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Previous by date:
Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Next by date:
Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.