while writing an ebuild which RDEPENDs on another package with a maximum version, I've spotted some strange behavior in Portage that I consider to be a bug. I've created a test-case to illustrate the bug. See the three attached ebuilds for: - app-misc/foopkg-1.0 - app-misc/barpkg-1.0 - app-misc/barpkg-2.0 The package in question should be foopkg which [R]DEPENDs on ~app-misc/barpkg-1 of which both version 1.0 and 2.0 ought to be in the tree. Reproducible: Always Steps to Reproduce: (0. place the files in your local overlay) 1. emerge foopkg - which correctly merges =app-misc/barpkg-1.0 and then =app-misc/foopkg-1.0 2. emerge barpkg - which will merge =app-misc/barpkg-2.0 (and thus breaks RDEPEND of foopkg!) 3. emerge foopkg again - which will correctly downgrade to =app-misc/barpkg-1.0 Expected Results: RDEPEND of the installed package foopkg should prevent an upgrade of barpkg
Created attachment 273465 [details] app-misc/foopkg/foopkg-1.0.ebuild
Created attachment 273467 [details] app-misc/barpkg/barpkg-1.0.ebuild
Created attachment 273469 [details] app-misc/barpkg/barpkg-2.0.ebuild
You want to use the emerge --complete-graph option. Also, --complete-graph will only work if the packages are reachable from system or world sets.
This tends to be a FAQ, so I'm going to say something about it here: http://www.gentoo.org/proj/en/portage/doc/faq.xml
I've added a new entry to the FAQ that looks like this: Why doesn't emerge account for reverse dependencies sometimes? Complete accounting for reverse dependencies is time-consuming, and many users would be likely complain about poor performance if this was the default behavior. So, reverse dependencies will often be neglected by dependency calculations unless the emerge --complete-graph option is enabled. You can set EMERGE_DEFAULT_OPTS="--complete-graph" in /etc/make.conf if you would like this option to be enabled by default. Refer to the emerge manual page (run man emerge) for more information about the --complete-graph option.
*** Bug 370243 has been marked as a duplicate of this bug. ***