Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 367555

Summary: sys-apps/portage: emerge sometimes does not respect reverse dependencies when --complete-graph is not enabled (FAQ)
Product: Gentoo Linux Reporter: Christian Bricart <christian>
Component: [OLD] Core systemAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: major CC: binki, dennis.lissov
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.gentoo.org/proj/en/portage/doc/faq.xml
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: app-misc/foopkg/foopkg-1.0.ebuild
app-misc/barpkg/barpkg-1.0.ebuild
app-misc/barpkg/barpkg-2.0.ebuild

Description Christian Bricart 2011-05-16 16:57:05 UTC
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
Comment 1 Christian Bricart 2011-05-16 16:58:33 UTC
Created attachment 273465 [details]
app-misc/foopkg/foopkg-1.0.ebuild
Comment 2 Christian Bricart 2011-05-16 16:59:03 UTC
Created attachment 273467 [details]
app-misc/barpkg/barpkg-1.0.ebuild
Comment 3 Christian Bricart 2011-05-16 16:59:25 UTC
Created attachment 273469 [details]
app-misc/barpkg/barpkg-2.0.ebuild
Comment 4 Zac Medico gentoo-dev 2011-05-16 18:22:00 UTC
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.
Comment 5 Zac Medico gentoo-dev 2011-05-16 18:49:38 UTC
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
Comment 6 Zac Medico gentoo-dev 2011-05-18 14:39:19 UTC
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.
Comment 7 Zac Medico gentoo-dev 2011-06-06 10:45:50 UTC
*** Bug 370243 has been marked as a duplicate of this bug. ***