Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526160 - sys-apps/portage-2.2.14: wants to replace dev-python/pypy with dev-python/pypy-bin (and skips virtual/pypy-2.3.1 to 2.4.0 upgrade)
Summary: sys-apps/portage-2.2.14: wants to replace dev-python/pypy with dev-python/pyp...
Status: RESOLVED FIXED
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: InVCS, TESTED
: 510370 (view as bug list)
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2014-10-21 01:24 UTC by Mike Gilbert
Modified: 2023-06-16 03:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge -uDpv --changed-use --debug world (debug.log.gz,623.57 KB, application/octet-stream)
2014-10-21 01:24 UTC, Mike Gilbert
Details
depgraph: fix bug #526160 (depgraph-fix-bug-526160.patch,5.00 KB, patch)
2014-10-27 00:58 UTC, Zac Medico
Details | Diff
depgraph: fix bug #526160 (depgraph-fix-bug-526160.patch,5.13 KB, patch)
2014-10-27 07:14 UTC, Zac Medico
Details | Diff
Test against f883c84b (debug.log.xz,293.80 KB, application/x-xz)
2014-10-28 19:35 UTC, Mike Gilbert
Details
_dep_check_composite_db: fix bug #526160 (_dep_check_composite_db-fix-bug-526160.patch,8.85 KB, patch)
2014-10-29 09:27 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2014-10-21 01:24:18 UTC
Created attachment 387102 [details]
emerge -uDpv --changed-use --debug world

I have the following in /etc/portage/package.keywords:

dev-python/pypy **
virtual/pypy **

Rather than upgrade to virtual/pypy-2.4.0 and dev-python/pypy-2.4.0, portage wants to replace dev-python/pypy-2.3.1 with dev-python/pypy-bin-2.3.1.

A debug log is attached.
Comment 1 Mike Gilbert gentoo-dev 2014-10-21 01:27:56 UTC
Also noteworthy is this workaround, which successfully upgrades to pypy-2.4.0 and rebuilds the necessary packages:

emerge -1 /usr/lib64/pypy virtual/pypy
Comment 2 Mike Gilbert gentoo-dev 2014-10-21 01:31:18 UTC
Adding --backtrack=1000 produces a different debug log, but the same end result.
Comment 3 Zac Medico gentoo-dev 2014-10-26 20:37:45 UTC
I suspect that adding dev-python/pypy world serve as a good workaround for this issue. I'll see if I can make a test case to reproduce it.
Comment 4 Zac Medico gentoo-dev 2014-10-26 22:48:17 UTC
The problem is likely to be rooted in the missed virtual/pypy-2.4.0 upgrade. I can reproduce that using a simple test case involving dev-python/pygments and virtual/pypy. Due to the virtual/pypy:0/2.3= dep of the install pygments instance, virtual/pypy-2.3.1 is added to the graph, and this later causes _dep_check_composite_db to select virtual/pypy-2.3.1 to satisfy the virtual/pypy:= dependency of the unbuilt dev-python/pygments replacement parent. So, it seems that _dep_check_composite_db needs to be fixed to detect the virtual/pypy-2.4.0 upgrade and choose that instead.
Comment 5 Zac Medico gentoo-dev 2014-10-27 00:58:59 UTC
Created attachment 387484 [details, diff]
depgraph: fix bug #526160

This fixes _dep_check_composite_db to mask packages that aren't the highest visible match, but only if an update is desirable. This causes desirable updates to get pulled in for cases like bug #526160. The included unit test simulates the virtual/pypy update that triggered the bug.
Comment 6 Zac Medico gentoo-dev 2014-10-27 07:14:06 UTC
Created attachment 387498 [details, diff]
depgraph: fix bug #526160

This updated patch fixes the new logic so that it only applies to virtual packages, since that's the only case where it is currently needed.
Comment 8 Mike Gilbert gentoo-dev 2014-10-28 19:35:30 UTC
Created attachment 387684 [details]
Test against f883c84b

I just tested with git master, and it still seems to prefer pypy-bin-2.3.1 over pypy-2.4.0.

Debug log attached.
Comment 9 Zac Medico gentoo-dev 2014-10-28 21:16:32 UTC
The debug log shows that slot_operator_update_probe is failing to pull in virtual/pypy-2.4.0, and it also shows "Virtual Parent" debug info in conjunction with the failure, indicating that the code from bug 141118 is being triggered. On the other hand, the debug log from my unit test does not show the "Virtual Parent" debug info. I'll have to investigate the reason for this difference, since that may lead to some more clues.
Comment 10 Zac Medico gentoo-dev 2014-10-29 09:27:38 UTC
Created attachment 387710 [details, diff]
_dep_check_composite_db: fix bug #526160

This patch applies on top of the previous one. Alternatively, use this branch:

	https://github.com/zmedico/portage/commits/bug_526160
Comment 11 Mike Gilbert gentoo-dev 2014-10-29 17:15:56 UTC
(In reply to Zac Medico from comment #10)

Nice work, that seems to have resolved it.
Comment 12 Zac Medico gentoo-dev 2014-10-29 18:04:45 UTC
Great, thanks for testing.
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-09 10:54:44 UTC
*** Bug 510370 has been marked as a duplicate of this bug. ***
Comment 15 Brian Dolbec (RETIRED) gentoo-dev 2014-12-04 05:39:53 UTC
This is in the portage-2.2.15 release.