Summary: | Redundancy between 2-style and 4-style usedeps | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexis Ballier <aballier> |
Component: | [OLD] Development | Assignee: | Package Manager Specification <pms> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | dev-portage |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Alexis Ballier
![]() The problem is that one cannot know in advance if [opt(-)] or [opt(+)] will be right. If a package always had the opt flag, and it is removed at some point, then it could mean either that the "opt" feature is removed, or that it is enabled unconditionally. (In reply to Ulrich Müller from comment #1) Well, yes, but this is irrelevant to the above: if opt is removed, cat/pkg[opt] is an error according to pms. option 2. sums up to asking developers to chose explicitly. Another option, which is what portage seems to do, is to consider 2-style usedeps when cat/pkg doesn't expose the useflag to never be satisified, as: - cat/pkg[foo] <=> cat/pkg[foo(-)] - cat/pkg[-foo] <=> cat/pkg[-foo(+)] (In reply to Alexis Ballier from comment #2) > (In reply to Ulrich Müller from comment #1) > > Well, yes, but this is irrelevant to the above: if opt is removed, > cat/pkg[opt] is an error according to pms. option 2. sums up to asking > developers to chose explicitly. They'll have to forsee the future in order to do that, which obviously is not possible (unless they have a crystal ball or something). The spec says (https://projects.gentoo.org/pms/5/pms.html#x1-870008.2.6.4): "Unless a 4-style default is specified, it is an error for a use dependency to be applied to an ebuild which does not have the flag in question in IUSE_REFERENCEABLE." A dependency can either be satisfied or not. For example, if the package atom specified is not in the tree (which can be valid usage for || ( ) dependencies or for blockers) then simply does not match, but it is not an error. Therefore it seems unsystematic to say "it is an error" for the specific case that the target of a use dependency doesn't have the flag. Also, how is the package manager supposed to handle that error? Treat the ebuild specifying the dependency as masked ("by corruption")? Maybe we should change/clarify the wording. It should say that such a use dependency is not satisfied, i.e. in the following sense: (In reply to Alexis Ballier from comment #2) > Another option, which is what portage seems to do, is to consider 2-style > usedeps when cat/pkg doesn't expose the useflag to never be satisified, as: > - cat/pkg[foo] <=> cat/pkg[foo(-)] > - cat/pkg[-foo] <=> cat/pkg[-foo(+)] "Unless a 4-style default is specified, a use dependency does not match if applied to an ebuild which does not have the flag in question in IUSE_REFERENCEABLE." (In reply to Ulrich Müller from comment #4) > The spec says (https://projects.gentoo.org/pms/5/pms.html#x1-870008.2.6.4): > "Unless a 4-style default is specified, it is an error for a use dependency > to be applied to an ebuild which does not have the flag in question in > IUSE_REFERENCEABLE." > > A dependency can either be satisfied or not. For example, if the package > atom specified is not in the tree (which can be valid usage for || ( ) > dependencies or for blockers) then simply does not match, but it is not an > error. yes, indeed > Therefore it seems unsystematic to say "it is an error" for the specific > case that the target of a use dependency doesn't have the flag. Also, how is > the package manager supposed to handle that error? Treat the ebuild > specifying the dependency as masked ("by corruption")? This is one way, a repoman error could be a good not so harsh solution too. > Maybe we should change/clarify the wording. It should say that such a use > dependency is not satisfied, i.e. in the following sense: > > (In reply to Alexis Ballier from comment #2) > > Another option, which is what portage seems to do, is to consider 2-style > > usedeps when cat/pkg doesn't expose the useflag to never be satisified, as: > > - cat/pkg[foo] <=> cat/pkg[foo(-)] > > - cat/pkg[-foo] <=> cat/pkg[-foo(+)] > > "Unless a 4-style default is specified, a use dependency does not match if > applied to an ebuild which does not have the flag in question in > IUSE_REFERENCEABLE." +1 after all, this is the one that makes most sense to me now. The point of this is to catch developer mistakes. Without it there's no way of knowing whether a developer has checked the behaviour, or just forgotten to do something about it. Closing per comment #6. |