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

Bug 179870

Summary: Incorrect behaviour when multiple slots of the same package are used in package.use
Product: Portage Development Reporter: Arfrever Frehtes Taifersar Arahesis (RETIRED) <arfrever>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.1   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 181949    
Attachments: tests.patch
distinguish slot atoms in package.use
distinguish slot atoms in package.use

Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-05-26 12:08:00 UTC
Incorrect behaviour when multiple slots of the same package are used in package.use.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-05-26 12:15:16 UTC
Created attachment 120355 [details, diff]
tests.patch

Save the attachment as /tmp/tests.patch, ensure that /etc/portage/package.use is a directory and run:
cd /
patch -p0 < /tmp/tests.patch
ebuild /usr/portage/sys-apps/test_a/test_a-1.ebuild manifest
ebuild /usr/portage/sys-apps/test_b/test_b-1.ebuild manifest

Next see the output of:
grep -E "SLOT|IUSE" /usr/portage/sys-apps/test_{a,b}/test*
cat /etc/portage/package.use/z_tests
emerge -pv sys-apps/test_{a,b}:{1,2}
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-05-26 12:18:02 UTC
(In reply to comment #0)
> Incorrect behaviour when multiple slots of the same package are used in
> package.use.

It works correctly when classically specified versions are used in package.use.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2007-05-28 21:16:35 UTC
Would be nice if you'd describe what happens, how it is wrong, and what you'd expect instead of/in addition to providing a cryptic testcase without posting the expected results.
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-05-29 07:24:23 UTC
(In reply to comment #3)
> Would be nice if you'd describe what happens, how it is wrong

There are incorrect USE flags of part of slots. Some USE flags should be enabled and some others should be disabled.

(In reply to comment #3)
> what you'd expect

I would expect correct USE flags.

(In reply to comment #3)
> cryptic testcase

It isn't cryptic.
Comment 5 Zac Medico gentoo-dev 2007-05-29 10:06:49 UTC
The problem happens in the following line inside config.setcpv():

self.pusekey = best_match_to_list(self.mycpv, self.pusedict[cp].keys())

The best_match_to_list() function can't distinguish which of the two slotted atoms is better, since the cpv that's passed in has no slot associated with it.
Comment 6 Zac Medico gentoo-dev 2007-05-29 11:32:51 UTC
Created attachment 120604 [details, diff]
distinguish slot atoms in package.use

This patch seems to work correctly.
Comment 7 Zac Medico gentoo-dev 2007-05-29 12:15:20 UTC
Created attachment 120606 [details, diff]
distinguish slot atoms in package.use

This version fixes it so that slotted packages aren't passed into pkgsplit since it doesn't handle them.
Comment 8 Zac Medico gentoo-dev 2007-05-31 01:29:02 UTC
This has been released in 2.1.2.9.