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

Bug 384041

Summary: [Tracker] KV_to_int, get_kv and other KV-related functions
Product: Quality Assurance Reporter: Brian Harring (RETIRED) <ferringb>
Component: TrackersAssignee: Gentoo Quality Assurance Team <qa>
Status: CONFIRMED ---    
Severity: normal CC: dev-portage
Priority: Normal Keywords: Tracker
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 586474, 587318, 587320, 587322    
Bug Blocks:    

Description Brian Harring (RETIRED) gentoo-dev 2011-09-22 03:06:11 UTC
Looks of it, someone tried punting it via leaving it out of the spec... supposedly the funcs have been deprecated for a long while (too lazy to look).

That said, kernel-2.eclass, toolchain-funcs.eclass, and glibc's unpack rely on it.

Either retroactively restore it to EAPI0 (since it's been there since day one and all managers support it), or come up w/ a proper solution rather than just ignoring it...
Comment 1 Ulrich Müller gentoo-dev 2011-09-22 10:05:02 UTC
This stuff was deprecated in 2006, in favour of linux-info.eclass: <http://archives.gentoo.org/gentoo-dev/msg_6105e51dbf4bfdd2c913a53a6d836a43.xml>

I'd rather see the eclasses fixed than adding such cruft to the spec. Things like $(KV_to_int ${KV}) won't work anyway, after KV was removed.
Comment 2 SpanKY gentoo-dev 2011-09-22 19:35:40 UTC
probably wouldn't be hard to convert the toolchain pkgs over to linux-info
Comment 3 Brian Harring (RETIRED) gentoo-dev 2011-09-22 21:03:10 UTC
kernel-2.eclass still has a literal KV_to_int ${KV} call in it... personal preference is removing the functionality, but mostly it needs to either be integrated, or removed from the tree (and the PM's need to stop exporting it).
Comment 4 Zac Medico gentoo-dev 2016-06-27 05:27:25 UTC
In portage-2.3.0 there's a related patch:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7e2f80c57ff5dc18b0737e72693e68eea4bc625e

It's causing problems as reported here:

https://forums.gentoo.org/viewtopic-t-1047248.html
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-27 18:18:39 UTC
Let's turn this into a tracker.
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2018-01-17 22:45:38 UTC
Just to make sure we replace this with the correct thing, get_KV is supposed to return the currently running kernel version?
Comment 7 Larry the Git Cow gentoo-dev 2019-01-27 20:28:03 UTC
The bug has been referenced in the following commit(s):

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

commit dd40cfb4721f691b5596e334960dea58b97f986a
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-01-27 20:13:56 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-01-27 20:27:53 +0000

    toolchain-glibc.eclass: avoid using KV_to_int and get_KV
    
    'KV_to_int' and 'get_KV' are portage internals.
    
    This change pulls in implementation of 'KV_to_int' and
    'get_KV' as-is with a rename:
        KV_to_int -> tc_glibc_KV_to_int
        get_KV    -> tc_glibc_get_KV (small API change)
    
    Reported-by: Brian Harring
    Reported-by: Michał Górny
    Bug: https://bugs.gentoo.org/384041
    Closes: https://bugs.gentoo.org/587320
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 eclass/toolchain-glibc.eclass | 54 +++++++++++++++++++++++++++++++++++++++----
 1 file changed, 50 insertions(+), 4 deletions(-)