Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536604 - dev-lang/lua:[5.1/5.2] should run eselect lua in pkg_postinst to set valid symlinks
Summary: dev-lang/lua:[5.1/5.2] should run eselect lua in pkg_postinst to set valid sy...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
Depends on:
Reported: 2015-01-14 14:48 UTC by eroen
Modified: 2019-03-18 21:44 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2015-01-14 14:48:42 UTC
When upgrading to slotted versions of dev-lang/lua, common files like (not exhaustive):
are no longer installed, and will not be available until the user manually runs `eselect lua`. There is no message to inform the user of this.

The slotted lua ebuilds should call `eselect lua` to set a valid lua in pkg_postinst(). Preferably this should be done in a way that preserves any previsously eselected lua, perhaps by adding an --if-unset option to `eselect lua update`.

occam ~ # emerge -pvq lua:5.1 lua:5.2 eselect-lua
[ebuild   R   ] app-admin/eselect-lua-1 
[ebuild   R   ] dev-lang/lua-5.1.5-r100  USE="deprecated readline -emacs -static" ABI_X86="32 (64) (-x32)" 
[ebuild   R   ] dev-lang/lua-5.2.3-r1  USE="deprecated readline -emacs -static" ABI_X86="32 (64) (-x32)"
Comment 1 Franz Trischberger 2015-04-08 06:33:54 UTC
There is a big issue with the eselect of lua: It does not work ;)
I currently have the following problem with awesome:
* I have set lua to 5.2 via eselect
* awesome fails in cmake as /usr/include/lua/lua.h is version 5.2
* I then specified -DLUA_INCLUDE_DIR (and -DLUA_LIBRARIES) in cmake args which went fine until linkage...
* linkage broke because actually there still was a <lua/lua.h> header around in /usr/include (which is in the default header search path) which points to lua5.2!
Many undefined references occur to lua_tonumberx, lua_rawlen, ... which are new in lua5.2, declared in lu5.2/lua.h (now /usr/include/lua.h!!!) but can't be found in

IMHO the only sane approach is to create a new lua.eclass which halps handling different lua versions, just like python eclasses do.

I would help, though I never created an eclass myself...