Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413311 - Clarify the difference between DEPEND and RDEPEND for strong blockers
Summary: Clarify the difference between DEPEND and RDEPEND for strong blockers
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-23 23:12 UTC by Davide Pesavento
Modified: 2023-01-03 14:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davide Pesavento (RETIRED) gentoo-dev 2012-04-23 23:12:12 UTC
The current wording is rather vague wrt strong (aka hard) blockers. Section 8.2.5.2 "Block Operator" of PMS just says:

"If the specification is prefixed with one or two exclamation marks, the named dependency is a block rather than a requirement—that is to say, the specified package must not be installed [...]
A weak block may be ignored by the package manager, so long as any blocked package will be uninstalled later on. A strong block must not be ignored."

So, weak blockers are like PDEPENDs, it's not specified when they'll be uninstalled, but it's guaranteed they will be uninstalled eventually.

For strong blockers, this could be interpreted as "invert the definition of {,R}DEPEND in section 8.1", i.e.:
    (a) !! in DEPEND -> the blocker must be uninstalled before any of the src_* phase functions is executed (but see [1]).
    (b) !! in RDEPEND -> the blocker must be uninstalled before the results of an ebuild merging are treated  as usable.

Point (a) makes sense, IOW it satisfies the use case of packages failing to build if an older version of themselves is already installed. As far as point (b) is concerned, well, I don't know what that really means. At any rate, I propose to positively define the semantics in both cases, instead of relying on a negation that is actually not a negation in the propositional logic sense.

The "new" definition of (b) would be: the blocker must be uninstalled before the package replacing it is merged. This satisfies the use case of packages that have file collisions (e.g. a symlink installed on top of a directory) with earlier versions of themselves, while allowing the PM to automatically solve strong blockers and to minimize the period of time during which the package being upgraded is unavailable.

All of the above might involve a semantic change which would require an EAPI bump, but otherwise the clarification seems a good thing to do.


[1] What happens for binary packages that do not execute src_* phases? Can the blocker be ignored just like DEPENDs are ignored for binary packages?