Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645190 - sys-apps/portage-2.3.19-r1: catalyst stage1 build pulls in static-dev to satisfy virtual/dev-manager dependency
Summary: sys-apps/portage-2.3.19-r1: catalyst stage1 build pulls in static-dev to sati...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 645194
  Show dependency tree
 
Reported: 2018-01-20 23:54 UTC by Zac Medico
Modified: 2018-06-03 16:45 UTC (History)
1 user (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-20 23:54:18 UTC
This problem is very similar to bug 645002. In this case, the problem is that virtual packages are counted in new_slot_count, but really we don't want to count virtuals since normally they are considered to have zero-cost.

The problem is reproducible with the following test case which pulls in static-dev instead of eudev:

ebuilds = {
	'sys-fs/eudev-3.1.5': {},
	'sys-fs/static-dev-0.1': {},
	'sys-fs/udev-233': {},
	'virtual/dev-manager-0': {
		'RDEPEND': '''
			|| (
				virtual/udev
				sys-fs/static-dev
			)'''
	},
	'virtual/udev-0': {
		'RDEPEND': '''
			|| (
				>=sys-fs/eudev-2.1.1
				>=sys-fs/udev-217
			)'''
	},
}

test_cases = (
	ResolverPlaygroundTestCase(
		[
			'virtual/dev-manager',
		],
		success=True,
		mergelist=(
			'sys-fs/eudev-3.1.5',
			'virtual/udev-0',
			'virtual/dev-manager-0',
		),
	),
)
Comment 2 Anthony Basile gentoo-dev 2018-01-21 00:20:36 UTC
This bit me hard.  I automate dozens of catalyst runs and they are all broken now.  I can't really wait too long.  What is the confidence in this patch?
Comment 3 Larry the Git Cow gentoo-dev 2018-01-21 00:22:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=74d0f516a346c7fb6c52a2508ca16b8949b3b65f

commit 74d0f516a346c7fb6c52a2508ca16b8949b3b65f
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2018-01-21 00:00:02 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-01-21 00:09:11 +0000

    dep_zapdeps: exclude virtuals from new_slot_count (bug 645190)
    
    Fix new_slot_count to exclude virtual packages, since they are considered
    to have zero-cost. This solves an issue where the catalyst stage1 build
    would unexpectedly pull in static-dev to satisfy virtual/dev-manager,
    but eudev is the preferred choice.
    
    Bug: https://bugs.gentoo.org/645190
    Fixes: 9fdaf9bdbdf5 ("dep_check: use DNF to optimize overlapping virtual || deps (bug 632026)")
    Reported-by: Ben Kohler <bkohler@gmail.com>

 pym/portage/dep/dep_check.py                       |  3 +-
 .../resolver/test_virtual_minimize_children.py     | 61 ++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)}
Comment 4 Zac Medico gentoo-dev 2018-01-21 00:26:27 UTC
(In reply to Anthony Basile from comment #2)
> This bit me hard.  I automate dozens of catalyst runs and they are all
> broken now.  I can't really wait too long.  What is the confidence in this
> patch?

The patch is ready to use. You also need the patch from bug 645002. You can get them both here:

https://github.com/gentoo/portage/compare/e81497dec819dbfc8e85e533db30d751fadaad81...74d0f516a346c7fb6c52a2508ca16b8949b3b65f.patch
Comment 5 Zac Medico gentoo-dev 2018-01-21 01:56:24 UTC
This is released in portage-2.3.20.
Comment 6 Michael Cook 2018-01-22 01:55:09 UTC
virtual/dev-manager needs a revbump.
Comment 7 Zac Medico gentoo-dev 2018-01-22 02:39:22 UTC
(In reply to Michael Cook from comment #6)
> virtual/dev-manager needs a revbump.

Thanks, done:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4821e616033d658c494780b1ec66bdace912071