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

Bug 657722 (slotted-lua)

Summary: [Tracker] Migration to new Lua eclasses (slotted Lua) (blocking unmasking)
Product: Gentoo Linux Reporter: Amel Hodzic <ilmostro7>
Component: Current packagesAssignee: William Hubbs <williamh>
Status: RESOLVED FIXED    
Severity: major CC: anrock623, esigra, hadrien.lacour, ilmostro7, jstein, marecki, mgorny, onigino, pacho, tobespammed, usefuljunk, williamh
Priority: Normal Keywords: InOverlay, PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/9300
https://github.com/gentoo/gentoo/pull/9311
https://bugs.gentoo.org/show_bug.cgi?id=757873
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 752513, 752516, 752522, 752525, 752528, 752531, 752534, 752537, 752540, 752543, 752549, 752552, 752555, 752558, 752561, 752564, 752567, 752570, 752573, 752576, 752582, 752588, 752591, 752594, 752597, 752600, 752603, 752606, 752609, 752612, 752615, 752618, 752621, 752624, 752627, 752630, 752633, 752636, 752639, 752642, 752645, 752648, 752651, 752654, 752657, 752660, 752663, 752666, 752669, 752672, 752675, 752678, 752681, 752684, 752687, 752690, 752693, 752696, 752699, 752702, 752705, 752708, 752714, 752717, 752720, 752723, 752726, 752729, 752732, 752738, 752744, 752750, 752753, 752759, 752762, 752765, 752768, 752771, 752780, 752783, 752786, 752789, 752792, 752795, 752798, 752801, 752804, 752807, 752810, 752813, 752816, 752819, 752822, 752828, 752831, 752834, 752837, 752840, 752843, 752846, 752849, 752852, 752855, 752861, 752864, 752867, 752870, 752876, 752879, 752882, 752885, 752888, 752891, 752894, 752897, 752900, 752903, 752906, 752909, 752912, 752915, 752918, 752921, 752924, 752927, 752930, 752933, 752936, 752939, 752942, 752945, 752951, 752954, 752957, 752960, 752963, 752966, 752969, 753068, 753071, 753074, 753077, 753080, 753083, 753086, 753089, 753092, 753095, 753098, 753107, 753110    
Bug Blocks: 407091, 508682    
Attachments: luaposix test output with lua-5.3
patch to fix luaposix slot operator to allow using slotted dev-lang/lua versions

Description Amel Hodzic 2018-06-10 08:51:54 UTC
lua-5.1.5-r4.ebuild:SLOT="0"

Whereas subsequent ebuilds have SLOT="5.1", etc.

lua-5.1.5-r100.ebuild:SLOT="5.1"
lua-5.1.5-r101.ebuild:SLOT="5.1"
lua-5.2.3.ebuild:SLOT="5.2"
lua-5.2.3-r1.ebuild:SLOT="5.2"
lua-5.2.3-r2.ebuild:SLOT="5.2"
lua-5.3.3.ebuild:SLOT="5.3"
lua-5.3.3-r1.ebuild:SLOT="5.3"

lua-5.1.5-r4.ebuild:SLOT="0"

Reproducible: Always

Steps to Reproduce:
1. Install multiple versions of dev-lang/lua
2. Try installing x11-wm/awesome or any package from the dev-lua/ category
3. The system falls back to using the lua version with SLOT="0"

Actual Results:  
 emerge -avt dev-lua/luaposix

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild  N    ~] dev-lua/luaposix-33.4.0::gentoo  629 KiB
[nomerge       ] dev-lang/lua-5.2.3-r2:5.2::gentoo  USE="readline -deprecated -emacs -static" ABI_X86="(64) -32 (-x32)" 
[uninstall     ]   dev-lang/lua-5.3.3-r1:5.3::gentoo  USE="readline -deprecated -emacs -static" ABI_X86="(64) -32 (-x32)" 
[nomerge       ] dev-lua/luaposix-33.4.0::gentoo 
[ebuild  NS    ]  dev-lang/lua-5.1.5-r4:0::gentoo [5.1.5-r101:5.1::gentoo, 5.2.3-r2:5.2::gentoo, 5.3.3-r1:5.3::gentoo] USE="readline -deprecated -emacs -static" ABI_X86="(64) -32 (-x32)" 0 KiB
[blocks B      ]  dev-lang/lua:0 ("dev-lang/lua:0" is blocking dev-lang/lua-5.1.5-r101, dev-lang/lua-5.2.3-r2, dev-lang/lua-5.3.3-r1)
[blocks B      ] dev-lang/lua:0 ("dev-lang/lua:0" is blocking dev-lang/lua-5.1.5-r101, dev-lang/lua-5.2.3-r2, dev-lang/lua-5.3.3-r1)

Total: 2 packages (1 new, 1 in new slot, 1 uninstall), Size of downloads: 629 KiB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (dev-lang/lua-5.1.5-r4:0/0::gentoo, ebuild scheduled for merge) pulled in by
    dev-lang/lua:0= required by (dev-lua/luaposix-33.4.0:0/0::gentoo, ebuild scheduled for merge)

  (dev-lang/lua-5.2.3-r2:5.2/5.2::gentoo, installed) pulled in by
    dev-lang/lua:5.2 required by @selected
    dev-lang/lua required by @selected

  (dev-lang/lua-5.1.5-r101:5.1/5.1::gentoo, installed) pulled in by
    dev-lang/lua required by @selected
    dev-lang/lua:5.1 required by @selected


For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant):

https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage#Blocked_packages


The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by dev-lua/luaposix (argument)
=dev-lua/luaposix-33.4.0 ~amd64

Expected Results:  
The package is installed with a dependency on one of the slotted lua packages.
Comment 1 Amel Hodzic 2018-06-10 09:15:21 UTC
It seems that the packages in the dev-lua/ category should be updated to use
RDEPEND="dev-lang/lua:*"
instead of
RDEPEND="dev-lang/lua:0=".

The above has been tested with dev-lua/luaposix-33.4.0 with lua-5.3 and lua-5.1 selected as the interpreters.
Comment 2 Amel Hodzic 2018-06-10 09:16:24 UTC
Created attachment 535506 [details]
luaposix test output with lua-5.3
Comment 3 Amel Hodzic 2018-06-10 09:22:37 UTC
Created attachment 535508 [details, diff]
patch to fix luaposix slot operator to allow using slotted dev-lang/lua versions
Comment 4 Amel Hodzic 2018-06-20 02:32:48 UTC
I've added a number of the dev-lua packages with appropriate patches to my overlay, [ag-ops](https://gitlab.com/ILMostro/ag-ops).  
I will use this bug to add a way to track this work.  Please feel free to provide advice and/or use the available patches to get beyond the dev-lang/lua:0 dependency.
Comment 5 Amel Hodzic 2018-06-20 08:11:46 UTC
Here's the list of packages that have been updated to remove dependency on deprecated dev-lang/lua:0 slot.

[I] dev-lua/ldoc (1.4.6[1]@06/20/2018 -> 1.4.6^t): A LuaDoc-compatible documentation generation system
[I] dev-lua/lgi (0.9.2[1]@06/19/2018): Lua bindings using gobject-introspection
[I] dev-lua/luafilesystem (1.7.0[1]@06/20/2018): File System Library for the Lua Programming Language
[?] dev-lua/luaposix (34.0.4[1]@06/20/2018 -> (~)33.4.0): Bindings for POSIX APIs
[I] dev-lua/penlight (1.5.4[1]@06/20/2018): Lua utility libraries loosely based on the Python standard libraries
[I] dev-lua/say (1.3_p1[1]@06/20/2018 -> 1.3_p1): Lua String Hashing/Indexing Library

net-irc/weechat-2.1
Portable and multi-interface IRC client
Comment 6 Amel Hodzic 2018-06-21 04:12:35 UTC
Given the updated packages listed in the previous message, it is now possible to build x11-wm/awesome and net-irc/weechat[lua] without a dependency on dev-lang/lua:0.
This allows users to have multiple versions of lua installed on the system, using eselect lua to switch between the slotted versions.
Comment 7 Amel Hodzic 2018-06-23 13:28:44 UTC
https://github.com/gentoo/gentoo/pull/8940
Comment 8 Amel Hodzic 2018-07-17 18:13:44 UTC
Latest attempt with dependant dev-db/redis[luajit] updated from dev-lang/luajit:2 to dev-lang/luajit:2.*

https://github.com/gentoo/gentoo/pull/9268
Comment 9 Amel Hodzic 2018-07-20 22:38:51 UTC
While the previous CI checks succeeded, the commit history has to adhere to GLEP66.  The latest PR is an attempt to do so.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-12-20 00:31:39 UTC
*** Bug 671248 has been marked as a duplicate of this bug. ***
Comment 11 Marek Szuba archtester gentoo-dev 2021-02-05 22:19:24 UTC
...and we're DONE here!