Tiny Core Extensions > TCE Corepure64

[Solved] lua 5.4.6 for TCL14 x86_64

<< < (3/8) > >>

jazzbiker:
Very nice!
If lua-lib is installed after lua-5.4-lib, /usr/local/lib/liblua.so link already exists, and is not overwritten.

GNUser:

--- Quote from: jazzbiker on August 18, 2023, 04:46:42 PM ---Very nice!
If lua-lib is installed after lua-5.4-lib, /usr/local/lib/liblua.so link already exists, and is not overwritten.

--- End quote ---
Aha! I didn't realize that loading extensions did not overwrite existing files. I did some tests and can confirm this is true.

Rich, do you know where in the tce-load script is the logic that prevents existing files from being overwritten when extensions are loaded? I can't seem to find it.

GNUser:
I found it: Lines 11 and 143 in /usr/bin/tce-load:

--- Code: ---FORCE="n"  # Overwrite system files default to no. Use -f to force overwrite.

--- End code ---

--- Code: --- yes "$FORCE" | sudo /bin/cp -ais /tmp/tcloop/"$APPNAME"/* / 2>/dev/null

--- End code ---

jazzbiker:
Hi GNUser,

What's Your opinion about adding tce.installed to lua-5.4.tcz?

--- Code: ---LUA_LATEST=$(ls /usr/local/bin/lua*.* | sort -V | tail -n1)
ln -sf $(readlink $LUA_LATEST) /usr/local/bin/lua
LUAC_LATEST=$(ls /usr/local/bin/luac*.* | sort -V | tail -n1)
ln -sf $(readlink $LUAC_LATEST) /usr/local/bin/luac

--- End code ---

and to lua-5.4-dev.tcz:

--- Code: ---LUA_LATEST=$(ls /usr/local/lib/pkgconfig/lua-*.*.pc | sort -V | tail -n1)
ln -sf $(readlink $LUA_LATEST) /usr/local/lib/pkgconfig/lua.pc

--- End code ---

I expect they will work nice.

EDIT: maybe the naming scheme needs to be changen in order for sort -V to work correctly. I mean
lua.5.4
luac.5.4
lua.5.4.pc

EDIT2: experiments show that it is not necessary.

GNUser:
Hi jazzbiker. These are very nice ideas but I already submitted the new set of extensions and am too burned out right now to create yet a third set of extensions.

If Juanito wants to swoop in and add the startup scripts to lua-5.4.tcz and lua-5.4-dev.tcz I would not object ;D

My only small objection is that lua.5.4 etc is a bit ugly and difficult to type. My vote is keep binary names as lua5.3, luac5.3, lua5.4, luac5.4, etc. Besides, sort -V works just fine with such names:

--- Code: ---$ cd /tmp/dummy
$ touch lua5.3
$ touch lua5.4
$ touch lua10.2 # version from the future!
$ ls | sort -V
lua5.3
lua5.4
lua10.2
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version