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?

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?

Reply via email to