pspdev / psp-packages

https://pspdev.github.io/psp-packages/
The Unlicense
24 stars 13 forks source link

Lua updates #174

Closed tpimh closed 3 months ago

tpimh commented 3 months ago
tpimh commented 3 months ago

Tested with this code on PPSSPP (will test on real hardware later):

tpimh commented 3 months ago

I believe that with support for conflicting packages, having 4 different Lua versions installed in parallel is not the right approach. Only one should be chosen as the default, the other 3 can replace it if needed, right?

sharkwouter commented 3 months ago

That would be doable. Adding the following lines to all the lua packages should work:

provides=('lua')
conflicts=('lua')

Make sure to remove the groups variable from all but the main one. I would call the main one just lua.

tpimh commented 3 months ago

@sharkwouter Hmm... After reading your comment, I am not sure if I did it correctly. I listed all the conflicting packages in conflicts and just lua in provides.

sharkwouter commented 3 months ago

Yeah, I would keep one that is named lua. I think it would be good to take a quick look here: https://wiki.archlinux.org/title/PKGBUILD#provides

There it states that it's good to add a version to the provides entry.

tpimh commented 3 months ago

Yes, adding a version is good idea.

Also ArchWiki has an entry on Virtual packages, so I guess this makes lua a virtual package (does not exist by itself, but is provided by multiple other packages).

If we don't want this, I suggest always having the latest version (currently, 5.4) being named just lua.

sharkwouter commented 3 months ago

Okay, that's fair. I was worried that if we would not name one of them lua, that it would just pick the highest version when trying to install lua. If the highest version number is what we want to be installed when installing lua, then we don't need to have a package explicitly named that.

sharkwouter commented 3 months ago

It seems the default is a bit different from what we were hoping, but generally this seems okay Screenshot from 2024-06-25 15-24-07

sharkwouter commented 3 months ago

If you already have a version of lua installed, it will just update that package when you run psp-pacman -S lua.

sharkwouter commented 3 months ago

This is what happens if you try to install a conflicting version: Screenshot from 2024-06-25 15-25-38

sharkwouter commented 3 months ago

@tpimh can you take a look at this PR?: https://github.com/pspdev/pspdev/pull/82

We should probably merge that before we merge this change. I'm happy with this solution, though. I'll merge this after we're sure that pspdev can work with it.