Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645416 - sys-apps/portage-2.3.20: virtual/rust-1.19.0 pulls in dev-lang/rust-bin-1.19.0 even though dev-lang/rust-1.19.0 is installed
Summary: sys-apps/portage-2.3.20: virtual/rust-1.19.0 pulls in dev-lang/rust-bin-1.19....
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, REGRESSION
Depends on:
Blocks: 645194
  Show dependency tree
 
Reported: 2018-01-22 21:21 UTC by Zac Medico
Modified: 2018-06-03 16:52 UTC (History)
6 users (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 Zac Medico gentoo-dev 2018-01-22 21:21:28 UTC
This happens even though dev-lang/rust-1.19.0 is installed:

$ emerge -pu --deep=2 virtual/rust

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

Calculating dependencies... done!
[nomerge       ] virtual/rust-1.19.0 
[ebuild  N    ~]  dev-lang/rust-bin-1.19.0  USE="doc" 

Reverting this commit from bug 643974 suppresses the problem:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=86ba22da7a2f34848cdb5a6f1090c22c264e577e

Where dep_zapdeps sets installed_downgrade = True, pdb shows this:

-> installed_downgrade = True
(Pdb) p avail_pkg
<Package ('installed', '/', 'dev-lang/rust-1.19.0', 'nomerge', 'installed')>
(Pdb) p highest_in_slot[-1]
<Package ('ebuild', '/', 'dev-lang/rust-1.23.0', 'merge', 'gentoo')>
Comment 1 Zac Medico gentoo-dev 2018-01-22 21:35:17 UTC
Pulling in dev-lang/rust-bin-1.19.0 here does make it possible to upgrade to dev-lang/rust-1.23.0 here, so it might be the "correct" thing to do in some cases.
Comment 3 Larry the Git Cow gentoo-dev 2018-01-27 20:53:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=5c888fcd2e87270523f55fb180ced5c3c8689f76

commit 5c888fcd2e87270523f55fb180ced5c3c8689f76
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-01-23 06:08:10 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-01-27 20:52:53 +0000

    dep_zapdeps: fix virtual/rust handling (bug 645416)
    
    Fix the code from bug 643974 to set the installed_downgrade flag only
    if the selected newer package is either installed or in the graph. This
    is currently needed for appropriate handling of virtual/rust-1.19.0,
    since there's an upgrade to dev-lang/rust-1.23.0 available which may
    not be desired since it would mean that dev-lang/rust-bin-1.19.0 has
    to be installed in order to satisfy virtual/rust-1.19.0:
    
     || ( =dev-lang/rust-1.19.0* =dev-lang/rust-bin-1.19.0* )
    
    So, the rust-bin choice is desirable only if the rust-1.23.0 package is
    already installed or in the graph.
    
    Fixes: 86ba22da7a2f ("dep_zapdeps: install new package, allow upgrade (bug 643974)")
    Bug: https://bugs.gentoo.org/645416

 pym/portage/dep/dep_check.py                       | 10 ++--
 .../tests/resolver/test_or_upgrade_installed.py    | 59 ++++++++++++++++++++++
 2 files changed, 66 insertions(+), 3 deletions(-)}
Comment 4 tt_1 2018-01-28 15:15:40 UTC
Can this patch be applied to portage-2.3.20 without any issues?
Comment 5 Zac Medico gentoo-dev 2018-01-28 17:23:11 UTC
(In reply to tt_1 from comment #4)
> Can this patch be applied to portage-2.3.20 without any issues?

Yes, it can.
Comment 6 tt_1 2018-01-29 14:58:41 UTC
Can the maintainers please push out a -r1 or make a point release, to have this fix included into tree?
Comment 7 Zac Medico gentoo-dev 2018-01-29 18:42:20 UTC
Yes, I'll do a portage-2.3.21 release soon, which will also include changed deps reporting (bug 645780).