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

Bug 635540

Summary: sys-apps/portage: || ( foo <bar-10 ) downgrades bar by default
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: slyfox
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=643974
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 155723, 628768, 637452    

Description Zac Medico gentoo-dev 2017-10-26 22:07:17 UTC
When solving cases like || ( foo <bar-10 ), generally it's better to pull in foo rather than downgrade bar. Currently, emerge tends to downgrade bar.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2017-11-01 22:33:57 UTC
|| ( sys-libs/glibc[rpc(-)]  net-libs/libtirpc ) 

^ the same happens here if the currently installed glibc has no rpc useflag... it also prefers downgrading glibc (impossible) to pulling in libtirpc
Comment 3 Larry the Git Cow gentoo-dev 2017-11-02 19:44:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7c58e37376166b787abae4713c398feee8abf902

commit 7c58e37376166b787abae4713c398feee8abf902
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2017-11-02 08:29:11 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2017-11-02 19:41:56 +0000

    dep_zapdeps: install new package, avoid downgrade (bug 635540)
    
    Prefer to install a new package rather than to downgrade an
    installed package. If the installed package should be
    downgraded due to it being masked, then allow the downgrade.
    
    Bug: https://bugs.gentoo.org/635540
    Acked-by: Brian Dolbec <dolsen@gentoo.org>

 pym/portage/dep/dep_check.py                       | 11 ++-
 .../tests/resolver/test_or_downgrade_installed.py  | 97 ++++++++++++++++++++++
 2 files changed, 107 insertions(+), 1 deletion(-)}