Bug in empack.py script
Script: https://gitlab.com/recalbox/recalbox/blob/master/scripts/linux/empack.py
Wiki entry: https://gitlab.com/recalbox/recalbox/wikis/recalbox-romfs#use-the-helper-script-empackpy
usage: empack.py [-h] -s SYSTEM -e EXTENSIONS [-f FULLNAME] [-p PLATFORM]
[-t THEME]
packageDetails [packageDetails ...]
I'll use recalbox-romfs-dreamcast.mk
to illustrate this, as using empack currently outputs wrong lines of code.
At this moment we are using the buildroot packages reicast
and reicast-old
, depending on which platform we are using an old commit or not, as bumping the emulator caused some performance issues on the xu4, x86 and x86_64 (see: !535 (merged)).
The first arguments are unproblematic: ./scripts/linux/empack.py --system dreamcast --extension '.gdi .GDI .cdi .CDI .chd .CHD' --fullname 'Sega Dreamcast' --platform dreamcast --theme dreamcast
, but the packageDetails
have the following bug(s?):
- Known bugs in
emulator:core:variable
-
reicast:reicast:BR2_PACKAGE_REICAST reicast:reicast:BR2_PACKAGE_REICAST_OLD
Currently, we either useBR2_PACKAGE_REICAST=y
orBR2_PACKAGE_REICAST_OLD=y
in defconfig for the updated (reicast) or outdated but stable (reicast-old) package/binary. Sameemulator:core
but differentBR2_PACKAGE_VARIABLE
, so empack doesn't handle this case well.
Same emulator:core
but different BR2_PACKAGE_VARIABLE
: https://pastebin.com/vTVjq4qC
How it should look like: STILL NEED TO FIND IT OUT :D
- advancemame isn't being properly created, as it was shown in xu4 build where it isn't available
Using the buggy empack give us: https://pastebin.com/6vVjKTBN
How it should look like: STILL NEED TO FIND IT OUT :D
- Cases where it appears to be working properly
- Only one
packageDetails
in the form libretro:core:BR2_PACKAGE_NAME (example: 3do) - Two
packageDetails
in the form libretro:core:BR2_PACKAGE_NAME (example: amstradcpc) - Only one
packageDetails
in the form BR2_PACKAGE_NAME (standalone emulator) (example: psp) - Only one
packageDetails
in the form emulator:core:BR2_PACKAGE_NAME (standalone emulator defining also emulator and core).
This makes the .mk file longer than needed, but appears to output the right structure. (NEEDS INVESTIGATION🔍 ) - Two
packageDetails
in the form BR2_PACKAGE_NAME (two standalone emulators) (example: current situation withBR2_PACKAGE_REICAST
andBR2_PACKAGE_REICAST_OLD
)
In this case, empack forces you to use the syntaxemulator:core:BR2_PACKAGE_NAME
. Is this really wanted or just easier to program? (NEEDS INVESTIGATION🔍 )