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

Bug 767211

Summary: dev-lang/lua-5.1.5-r106 ebuild fails to change default lua_path and lua_cpath
Product: Gentoo Linux Reporter: Tommy Pettersson <ptp>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED WONTFIX    
Severity: trivial CC: ionen, robbat2
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild that keeps /usr/local in lua paths
ebuild patch that keeps /usr/local in lua paths

Description Tommy Pettersson 2021-01-25 21:32:02 UTC
It would be nice to have Lua search both /usr/ and /usr/local/ for modules.
This is exactly what the patch module_paths.patch in src_prepare() does.
But then, in multilib_src_configure(), the sed expression rewrites all /usr/local/ to /usr/, so /usr/local/ is not added as intended (and /usr/ appears twice in the paths).
Comment 1 ayuayuayu 2022-05-20 08:45:32 UTC
Created attachment 779603 [details]
ebuild that keeps /usr/local in lua paths
Comment 2 ayuayuayu 2022-06-20 04:47:11 UTC
Created attachment 786377 [details, diff]
ebuild patch that keeps /usr/local in lua paths
Comment 3 David Seifert gentoo-dev 2022-09-11 10:12:14 UTC
After investigating the landscape of multiple scripting languages, I have come to the conclusion that we won't add this feature.

Rationale:

Guile, PHP, Python, Ruby and Tcl do not add any subdirectory of /usr/local to their search path. All of these languages have mechanisms to add extra paths via environment variables.

Perl does add /usr/local to its INC path, but is the odd one out from all the languages I looked at.

Given these facts and the fact that you can always use LUA_PATH to inject a path into the list of search paths, we won't act on this.