Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179870 - Incorrect behaviour when multiple slots of the same package are used in package.use
Summary: Incorrect behaviour when multiple slots of the same package are used in packa...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 181949
  Show dependency tree
 
Reported: 2007-05-26 12:08 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2007-05-31 01:29 UTC (History)
0 users

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


Attachments
tests.patch (tests.patch,1.22 KB, patch)
2007-05-26 12:15 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff
distinguish slot atoms in package.use (puse_slot.patch,1.63 KB, patch)
2007-05-29 11:32 UTC, Zac Medico
Details | Diff
distinguish slot atoms in package.use (puse_slot.patch,3.09 KB, patch)
2007-05-29 12:15 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.