Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 518642 - || ( foo:= bar:= ) deps should not allow switching providers
Summary: || ( foo:= bar:= ) deps should not allow switching providers
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-31 08:17 UTC by Michał Górny
Modified: 2014-07-31 08:26 UTC (History)
0 users

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 2014-07-31 08:17:29 UTC
Let's assume an ebuild has the following RDEPEND:

  || ( foo:0= bar:0= )

After installing the package against bar, portage writes the following to vdb:

  || ( foo:0 bar:0/1= )

So, it expands the used provider to trigger slot-op rebuilds and removes the slot operator from the other to prevent them.

However, if there's at least one := in || (), I think we can clearly guess that switching providers at run-time is not safe (we can't guarantee matching binary ABI).

Right now, if I do:

  emerge -1v foo

and the two are mutually exclusive, emerge just wants to replace bar with any version of foo without rebuilding.

If we instead stored:

  || ( foo:notinst= bar:0/1= )

emerge notices you can't replace one with the other and fails with conflict. If I tip it:

  emerge -1v foo otherpkg

it plans rebuild of otherpkg and everything works as expected :). Sadly, I can't get the same behavior via large --backtrack.

Note that instead of 'notinst' we ought to probably use something alike '-notinst' -> reserved value that doesn't match valid slot names.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-31 08:26:55 UTC
Oh, and this also breaks my @changed-deps magic. If we at least stored foo:0= (instead of plain foo:0) it would fix it, and this doesn't change emerge behavior at all.