Hi, jazzbiker.
Loading old version of the library then loading new version works as expected:
$ tce-load -i lua-5.3-lib
lua-5.3-lib.tcz: OK
$ readlink /usr/local/lib/liblua.so
/tmp/tcloop/lua-5.3-lib/usr/local/lib/liblua.so
$ tce-load -i lua-5.4-lib
lua-5.4-lib.tcz: OK
$ readlink /usr/local/lib/liblua.so
/tmp/tcloop/lua-5.4-lib/usr/local/lib/liblua.so.5.4.6
Then I make sure onboot.lst has no lua-*-lib extensions, and reboot.
Next test: Load new version of the library, then load the old version:
$ tce-load -i lua-5.4-lib
lua-5.4-lib.tcz: OK
$ readlink /usr/local/lib/liblua.so
/tmp/tcloop/lua-5.4-lib/usr/local/lib/liblua.so.5.4.6
$ tce-load -i lua-5.3-lib
lua-5.3-lib.tcz: OK
$ readlink /usr/local/lib/liblua.so
/tmp/tcloop/lua-5.4-lib/usr/local/lib/liblua.so.5.4.6
This test also gives us the result we want (liblua.so pointing to newest version), but it is somewhat unexpected. I would have expected that loading lua-5.3.lib (which does not have a startup script for smart liblua.so) would have clobbered liblua.so with its own version (i.e., the one that points to /tmp/tcloop/lua-5.3-lib/usr/local/lib/liblua.so which in turns points to /tmp/tcloop/lua-5.3-lib/usr/local/lib/liblua.so.5.3.6).