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: Marien Zwart <marienz@g.o>
Subject: Re: [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Date: Fri, 22 Jun 2012 18:27:13 +0200
On do, 2012-06-21 at 20:05 +0100, David Leverton wrote:
> 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?

I would still prefer for the resolver to not treat such packages
specially at all, and to just deal with USE flag changes explicitly the
same way they're dealt with for "normal" packages/flags, just skipping
the actual rebuild and reinstall steps (just updating the vdb). This
sidesteps problems like this one completely. If the package manager
folks think they can safely do something smarter here that might be
nice, but the feature still seems useful (in reducing the number of
silly rebuilds) and far easier to understand without such magic.

This also means things like has_version checks work exactly like they do
right now.

> 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 )

There may be more than one version of docmangler, with a postscript flag
with different effects (IUSE_RUNTIME or full IUSE, different
dependencies). That means this kind of rewriting would have to be done
based on the dependencies of the docmangler installed at the time this
package gets built, which seems like entirely too much magic, and...

> 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)

this seems generally impossible, as the same USE flag may be
IUSE_RUNTIME in only some versions of docmangler.

> 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

I would be in favor of leaving this up to the writer of the coolapp
ebuild, especially as if docmangler is currently using a "full" USE flag
for postscript this is already currently broken. It seems coolapp should
not be building the pdfs, or should be deleting them after they're
built, rather than forbidding the user from having a docmangler that can
create pdfs (as presumably not *all* generated pdfs are corrupt).

I really think this GLEP should be purely about reducing silly rebuilds
in packages where it makes sense to USE-depend on them with a flag set,
or where an already popular flag can be used to pull in some obvious
packages. I think something like "suggested" dependencies can be used to
solve a slightly different problem, and perhaps we could have those too,
but let's leave those for later.

-- 
Marien Zwart



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: A friendly reminder: Ciaran McCreesh is not a Gentoo dev
Next by date:
Re: [RFC] gcc-native-flags() proposal addition to toolchain-funcs.eclass


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.