Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682472 - emerge --onlydeps-with-rdeps=n --update uses RDEPEND if target package is installed
Summary: emerge --onlydeps-with-rdeps=n --update uses RDEPEND if target package is ins...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-04 00:25 UTC by Daniel Erat
Modified: 2019-05-14 17:19 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 Daniel Erat 2019-04-04 00:25:57 UTC
Using sys-apps/portage-2.3.49-r27:0, I'm seeing "emerge --onlydeps --onlydeps-with-rdeps=n" unexpectedly match RDEPEND dependencies if the target package is already installed. If the target package is not installed, it only matches DEPEND dependencies (as I would expect).

To demonstrate the issue, I defined three packages:

chromeos-base/deps-example/deps-example-9999.ebuild:
EAPI=5
DESCRIPTION="Base package demonstrating RDEPEND issue"
LICENSE="BSD"
KEYWORDS="*"
SLOT="0"
DEPEND="chromeos-base/deps-example-dep"
RDEPEND="chromeos-base/deps-example-rdep"

chromeos-base/deps-example/deps-example-dep-9999.ebuild:
EAPI=5
DESCRIPTION="Build-time dependency demonstrating RDEPEND issue"
LICENSE="BSD"
KEYWORDS="*"
SLOT="0"

chromeos-base/deps-example-rdep/deps-example-rdep-9999.ebuild:
EAPI=5
DESCRIPTION="Runtime dependency demonstrating RDEPEND issue"
LICENSE="BSD"
KEYWORDS="*"
SLOT="0"

Initially, I see the expected output, i.e. only the DEPEND package is printed:

$ emerge --onlydeps --onlydeps-with-rdeps=n --update --deep 1 --pretend --quiet y =chromeos-base/deps-example-9999                                                                                                                                      
[ebuild  N    ] chromeos-base/deps-example-dep-9999

If I emerge deps-example (which also emerges both of the dependencies) and then run "emerge -C deps-example-rdep deps-example-dep" to produce missing dependencies, then the same command lists both the DEPEND and RDEPEND packages:

$ emerge --onlydeps --onlydeps-with-rdeps=n --update --deep 1 --pretend --quiet y =chromeos-base/deps-example-9999                                                                                                                                      
[ebuild  N    ] chromeos-base/deps-example-rdep-9999                                                                                                                                                                                                                            
[ebuild  N    ] chromeos-base/deps-example-dep-9999

--onlydeps-with-rdeps=n seems to be ignored in this case. After uninstalling deps-example, I again see only the DEPEND package printed:

$ emerge --onlydeps --onlydeps-with-rdeps=n --update --deep 1 --pretend --quiet y =chromeos-base/deps-example-9999                                                                                                                                      
[ebuild  N    ] chromeos-base/deps-example-dep-9999

I see the unexpected behavior if the RDEPEND package is installed but outdated -- it gets printed if deps-example is installed even though --onlydeps-with-rdeps=n should be excluding it.
Comment 1 Daniel Erat 2019-04-04 20:12:41 UTC
This only appears to happen when --update is supplied:

$ equery l 'deps-example*'                                                                                                                                                                                                                              
 * Searching for deps-example* ...                                                                                                                                                                                                                                              
[I-O] [  ] chromeos-base/deps-example-9999:0
$ emerge --onlydeps --onlydeps-with-rdeps=n --deep 1 --pretend --quiet y =chromeos-base/deps-example-9999                                                                                                                                               
[ebuild  N    ] chromeos-base/deps-example-dep-9999

In other words, --update seems to cause --onlydeps-with-rdeps=n (at least, as I understand it) to be ignored.