Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 788076 - games-util/xpadneo: calls tc-getLD in global scope
Summary: games-util/xpadneo: calls tc-getLD in global scope
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-04 02:50 UTC by Sam James
Modified: 2021-05-04 03:24 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-04 02:50:40 UTC
It's used to create a variable which is only going to be used in certain phases, but it still seems wrong to define this in global scope, no?
Comment 1 Ionen Wolkens gentoo-dev 2021-05-04 02:56:55 UTC
But it's not called in global scope?

It's just plain text that's going to evaluated during phases. Note the =''
Comment 2 Ionen Wolkens gentoo-dev 2021-05-04 03:02:16 UTC
Same goes for KV_OUT_DIR which isn't even usable yet in global scope, these are meant to go through "eval" later.

BUILD_PARAMS='V=1 LD="$(tc-getLD)" KERNEL_SOURCE_DIR="${KV_OUT_DIR}"'
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-04 03:12:39 UTC
I suppose this is the same as the PATCHES question -- if a variable isn't going to be evaluated, it's fine.

I was thinking about whether it's legal for a package manager to evaluate them ahead of time if it wanted to. I guess not?
Comment 4 Ionen Wolkens gentoo-dev 2021-05-04 03:24:21 UTC
I might add that even if I moved this to pkg_setup, it wouldn't remove the UnusedInherit pkgcheck as pkgcheck recognize it as plain text rather than function usage.

On that topic, I feel linux-mod consumers should be more careful with BUILD_PARAMS, that it's going to be ran through "eval" is often overlooked and all sort of things are pre-expanded.