Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 393203 - toolchain.eclass, toolchain-binutils.eclass: Replace "multislot" USE flag with TOOLCHAIN_MULTISLOT variable
Summary: toolchain.eclass, toolchain-binutils.eclass: Replace "multislot" USE flag wit...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 174407
Blocks:
  Show dependency tree
 
Reported: 2011-12-05 02:38 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2011-12-05 07:25 UTC (History)
1 user (show)

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


Attachments
Patch for toolchain.eclass and toolchain-binutils.eclass (eclasses.patch,1.73 KB, text/plain)
2011-12-05 02:38 UTC, Arfrever Frehtes Taifersar Arahesis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2011-12-05 02:38:03 UTC
Created attachment 294817 [details]
Patch for toolchain.eclass and toolchain-binutils.eclass

Portage's ebuild.sh now contains:

	# These dummy functions return false, in order to ensure that
	# `use multislot` is false for the "depend" phase.
	for x in use useq usev ; do
		eval "${x}() { return 1; }"
	done

This means that 'use multislot' called in global scope of toolchain.eclass and toolchain-binutils.eclass always returns false and multislot functionality is always disabled.

I suggest to replace "multislot" USE flag with TOOLCHAIN_MULTISLOT variable, which can be set using e.g. /etc/make.conf or /etc/portage/package.env. I'm attaching the patch for toolchain.eclass and toolchain-binutils.eclass.
Comment 1 SpanKY gentoo-dev 2011-12-05 05:58:07 UTC
things seem to work fine for me:
$ cat /var/db/pkg/sys-devel/gcc-4.6.2/SLOT
x86_64-pc-linux-gnu-4.6.2
$ cat /var/db/pkg/sys-devel/binutils-2.22/SLOT 
x86_64-pc-linux-gnu-2.22

so unless things aren't working for you, i don't intend on "fixing" this
Comment 2 Arfrever Frehtes Taifersar Arahesis 2011-12-05 06:15:49 UTC
Which version of Portage do you use?
Comment 3 Arfrever Frehtes Taifersar Arahesis 2011-12-05 06:17:02 UTC
What is printed for you by the following commands?:

$ python -c 'import portage; dbapi = portage.db["/"]["porttree"].dbapi; print(dbapi.match("sys-devel/binutils:0"))'
$ $ python -c 'import portage; dbapi = portage.db["/"]["porttree"].dbapi; print(dbapi.match("sys-devel/binutils:x86_64-pc-linux-gnu-2.22"))'
Comment 4 Mike Gilbert gentoo-dev 2011-12-05 06:24:58 UTC
The dummy definition of use() only applies in the depend phase. In all other phases, the real function from phase-helpers.sh is used.

So, the cached metadata values end up being screwy. I think vapier is already aware of that.
Comment 5 SpanKY gentoo-dev 2011-12-05 06:28:24 UTC
yes, the cache as published by the rsync server will not match what the user needs on their end system when they're using USE=multislot.  but portage recovers fine afaict and updates the SLOT to the right value (albeit with a QA warning of sorts as the SLOT value changed).
Comment 6 Mike Gilbert gentoo-dev 2011-12-05 06:41:40 UTC
I think a possible advantage to using a separate variable in make.conf (like TOOLCHAIN_MULITSLOT) would be that emerge --regen would (re)generate a "valid" cache entry for people with it enabled.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2011-12-05 07:25:46 UTC
I don't use rsync server. I currently have sys-devel/binutils-2.22:0 installed and no other slots. If I enable "multislot" USE flag and touch eclasses to force regeneration of metadata, then:

# USE="multislot" emerge -pv =sys-devel/binutils-2.21

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

[ebuild     UD ] sys-devel/binutils-2.21 [2.22] USE="multislot* nls zlib -multitarget -static-libs -test -vanilla" 0 kB

Total: 1 package (1 downgrade), Size of downloads: 0 kB
#

As you can see, Portage wants to replace installed sys-devel/binutils-2.22 with sys-devel/binutils-2.21. If a separate variable was used during generation of metadata, then Portage would know about other slots.