Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586238 - [TRACKER] Uses of slot operator := in any-of dependency specs
Summary: [TRACKER] Uses of slot operator := in any-of dependency specs
Status: RESOLVED FIXED
Alias: None
Product: Quality Assurance
Classification: Unclassified
Component: Trackers (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords: Tracker
Depends on: 586240 586304 586308 586310 586312 586314 586316 586318 586320 586322 586326 586328 586330 586900 586902 586904 586906 586908 586910 586912 586914 586916 586918 586920 586922 586924 586926 586928 586930 586932
Blocks:
  Show dependency tree
 
Reported: 2016-06-17 21:13 UTC by Michał Górny
Modified: 2023-12-10 22:01 UTC (History)
1 user (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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-17 21:13:53 UTC
Long story short, any occurence of := operator inside || () is forbidden. It doesn't do what you think it does, Portage mis-implements it terribly.
Comment 1 Andrew Savchenko gentoo-dev 2016-06-18 22:51:13 UTC
Subslot operator := inside || () clause is allowed by PMS as was pointed out by axs on the gentoo-dev mail list:

8.2: [...]
An any-of group, which consists of the string ||, followed by
whitespace, followed by an open parenthesis, followed by whitespace,
followed by zero or more of (a dependency item of any kind followed by
whitespace), followed by a close parenthesis.

Note "a dependency item of any kind" here. So these packages are valid according to current PMS. Such issues must have a community discussion prior to enforcing controversial changes on packages.

@qa team, I'd like to hear your opinion on this. It is likely that problem needs to be fixed elsewhere.

Anyway, I see no evidence that "any occurence of := operator inside || () is forbidden" as mgorny stated.
Comment 2 Ulrich Müller gentoo-dev 2016-06-21 11:10:59 UTC
(In reply to Andrew Savchenko from comment #1)
> @qa team, I'd like to hear your opinion on this. It is likely that problem
> needs to be fixed elsewhere.

Right, there is bug 489458 for fixing of the underlying problem.

> Anyway, I see no evidence that "any occurence of := operator inside || () is
> forbidden" as mgorny stated.

It isn't clear to me if the construct is formally allowed. There may be issues with VDB generation.

However, even if it was allowed, bug 489458 comment 13 has a rationale why the behaviour is not very useful. Assuming there is a runtime dependency like || ( foo:= bar:= ) then the PM could switch from foo:1 to bar and then from bar to foo:2 which renders the := useless.
Comment 3 Andrew Savchenko gentoo-dev 2016-06-21 12:33:55 UTC
(In reply to Ulrich Müller from comment #2)
> However, even if it was allowed, bug 489458 comment 13 has a rationale why
> the behaviour is not very useful. Assuming there is a runtime dependency
> like || ( foo:= bar:= ) then the PM could switch from foo:1 to bar and then
> from bar to foo:2 which renders the := useless.

Solution is simple: in case of || ( A:= B:= ) treat change from A to B be like subslot change (IOW rebuild is required if old or new have :=). This approach will solve even || ( A:= B ) cases.
Comment 4 Ulrich Müller gentoo-dev 2016-06-21 13:25:40 UTC
(In reply to Andrew Savchenko from comment #3)
> Solution is simple: in case of || ( A:= B:= ) treat change from A to B be
> like subslot change (IOW rebuild is required if old or new have :=). This
> approach will solve even || ( A:= B ) cases.

It won't, because behaviour of || in case of a provider change is undefined. There are cases where a rebuild is not desirable.

That's why we need a ||= operator, see bug 489458.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-21 21:16:49 UTC
commit 3b1a4cc0f9b9a0a2c70d6bb53cb71bf059e2920e
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Tue Jun 21 23:02:17 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Tue Jun 21 23:03:57 2016

    dev-ml/ocamlnet: Remove another := slot op from || dep

commit 9675d96cfe244033e97dd7034b95c5af251405e3
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Tue Jun 21 23:01:45 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Tue Jun 21 23:02:55 2016

    dev-ml/lablgl: Remove another := slot op from || dep
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-21 21:17:08 UTC
(In reply to Michał Górny from comment #5)
> commit 3b1a4cc0f9b9a0a2c70d6bb53cb71bf059e2920e
> Author:     Michał Górny <mgorny@gentoo.org>
> AuthorDate: Tue Jun 21 23:02:17 2016
> Commit:     Michał Górny <mgorny@gentoo.org>
> CommitDate: Tue Jun 21 23:03:57 2016
> 
>     dev-ml/ocamlnet: Remove another := slot op from || dep
> 
> commit 9675d96cfe244033e97dd7034b95c5af251405e3
> Author:     Michał Górny <mgorny@gentoo.org>
> AuthorDate: Tue Jun 21 23:01:45 2016
> Commit:     Michał Górny <mgorny@gentoo.org>
> CommitDate: Tue Jun 21 23:02:55 2016
> 
>     dev-ml/lablgl: Remove another := slot op from || dep

Oops, wrong bug. Sorry.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-22 03:34:09 UTC
All direct QA failures were fixed now. We can handle improving individual deps on the specific bugs.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-24 12:10:21 UTC
A number of issues were reintroduced by aballier.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-14 06:17:55 UTC
Fatal in pkgcheck for quite some time and no instances in tree.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-14 06:18:14 UTC
(In reply to Sam James from comment #9)
> Fatal in pkgcheck for quite some time and no instances in tree.

https://github.com/pkgcore/pkgcheck/commit/387b96a44c9cd81167266ee797351ad7240f40f6
Comment 11 Larry the Git Cow gentoo-dev 2023-12-10 22:01:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=ee127db438307c133fcf650c148ed594ceb68591

commit ee127db438307c133fcf650c148ed594ceb68591
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-04 17:40:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-10 22:01:48 +0000

    dep: add comment to _eval_deps wrt binding slot deps in any-of || ( ... )
    
    Bug: https://bugs.gentoo.org/455904
    Bug: https://bugs.gentoo.org/489458
    Bug: https://bugs.gentoo.org/586238
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/portage/dep/_slot_operator.py | 1 +
 1 file changed, 1 insertion(+)