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

Bug 836210

Summary: sys-apps/pkgcore-0.12.10 (with dev-util/pkgcheck-0.10.9-r1): Exported bash functions leak into check environment
Product: Gentoo Hosted Projects Reporter: Ulrich Müller <ulm>
Component: PkgCoreAssignee: PkgCore project <pkgcore>
Status: RESOLVED FIXED    
Severity: normal CC: arthurzam, gentoo, mgorny, sam, toralf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Ulrich Müller gentoo-dev 2022-03-26 18:24:32 UTC
$ foo() { :; }
$ export -f foo
$ pkgcheck scan eapi8-dosym.eclass
eclass
  EclassDocMissingFunc: eapi8-dosym: undocumented function: foo

Expected result: Functions from the environment should not affect the output.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-03-26 19:21:05 UTC
I suppose the primary question is: should this be supported for regular ebuild ops, i.e. should user be allowed to inject functions into ebuild env?  In other words, should we just strip it at pkgcheck level to fix the check, or should we change pkgcore behavior here?
Comment 2 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2022-12-13 19:00:19 UTC
*** Bug 833400 has been marked as a duplicate of this bug. ***
Comment 3 Larry the Git Cow gentoo-dev 2022-12-13 19:58:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/pkgcore/pkgcore.git/commit/?id=3ab961d6aa165a53b7319fefad0540ada676d6cd

commit 3ab961d6aa165a53b7319fefad0540ada676d6cd
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2022-12-13 19:50:38 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2022-12-13 19:50:38 +0000

    eclass: fix exported bash functions leak
    
    Closes: https://bugs.gentoo.org/836210
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 src/pkgcore/ebuild/eclass.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)