Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 767211 - dev-lang/lua-5.1.5-r106 ebuild fails to change default lua_path and lua_cpath
Summary: dev-lang/lua-5.1.5-r106 ebuild fails to change default lua_path and lua_cpath
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-01-25 21:32 UTC by Tommy Pettersson
Modified: 2022-09-11 10:12 UTC (History)
2 users (show)

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


Attachments
ebuild that keeps /usr/local in lua paths (lua-5.1.5-r106.ebuild,3.97 KB, text/plain)
2022-05-20 08:45 UTC, ayuayuayu
Details
ebuild patch that keeps /usr/local in lua paths (lua-5.1.5-r106.ebuild.patch,312 bytes, patch)
2022-06-20 04:47 UTC, ayuayuayu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.