Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 524916 - --onlydeps does not work when this_package:this_slot has DEPEND="|| ( other_package this_package:this_slot )" and this_package:other_slot is installed
Summary: --onlydeps does not work when this_package:this_slot has DEPEND="|| ( other_p...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, PATCH
Depends on:
Blocks: 155723 484436
  Show dependency tree
 
Reported: 2014-10-10 01:51 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2015-01-02 05:21 UTC (History)
1 user (show)

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


Attachments
dep_zapdeps: handle circular deps with --onlydeps (dep_zapdeps-handle-circular-deps-with-onlydeps.patch,3.07 KB, patch)
2014-10-27 22:06 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2014-10-10 01:51:07 UTC
I use Portage trunk (2.2.13_p27, 02ed485976fbf88a548c7b83978e23e3b50f41a2).

# cat app-misc/A/A-1.ebuild
EAPI="5"
SLOT="1"
KEYWORDS="*"
DEPEND="|| ( app-misc/B app-misc/A:1 )"
# cat app-misc/A/A-2.ebuild
EAPI="5"
SLOT="2"
KEYWORDS="*"
# cat app-misc/B/B-0.ebuild
EAPI="5"
SLOT="0"
KEYWORDS="*"
# emerge -optv app-misc/A:1

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[nomerge       ] app-misc/A-1:1::local 
[ebuild  N     ]  app-misc/B-0::local  0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB
# emerge -1 app-misc/A:2
...
# emerge -optv app-misc/A:1

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild  NS    ] app-misc/A-1:1::local [2:2::local] 0 KiB
[ebuild  N     ]  app-misc/B-0::local  0 KiB

Total: 2 packages (1 new, 1 in new slot), Size of downloads: 0 KiB
Comment 1 Zac Medico gentoo-dev 2014-10-27 01:41:27 UTC
I have a unit test based on comment #0 that reproduces this bug:

	https://github.com/zmedico/portage/tree/bug_524916
Comment 2 Zac Medico gentoo-dev 2014-10-27 22:06:45 UTC
Created attachment 387600 [details, diff]
dep_zapdeps: handle circular deps with --onlydeps

This fixes a case with --onlydeps were dep_zapdeps would pull in an avoidable direct circular dependency on an onlydeps node. The logic changes only apply to --onlydeps, so there's no chance of regressions for cases when --onlydeps is not enabled.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2015-01-02 05:21:13 UTC
Fixed in Portage 2.2.15.