Open stefanerwinmayer opened 3 years ago
Aside: The error messages come from the shell and do not contain the word 'error' like other errors. Makes them hard to spot.
I found a 4th one in the cheats installation:
error: cannot create /media/fat/cheats/TGFX16/Ranma ? (CD)(Jpn) [].zip Invalid argument
I believe all 4 invalid arguments are due to using characters not allowed.
@Firebrandx I reported that one here: https://github.com/MiSTer-devel/Updater_script_MiSTer/issues/58
Since it's the same type of error (invalid argument), I figured it didn't need a separate report. No worries either way.
The issue is indeed with the value assigned to the CORE_INTERNAL_NAME variable:
CORE_INTERNAL_NAME="$(curl $CURL_RETRY $SSL_SECURITY_OPTION -sSLf "${CORE_SOURCE_URL}?raw=true" | awk '/CONF_STR[^=]*=/,/;/' | grep -oE -m1 '".*?;' | sed 's/[";]//g')"
The non-greedy/lazy matching in the regular expression of the grep command seems to be unsupported and causes the issue (despite the -E (PATTERN is an extended regexp) option). Update: It seems that neither BRE (Basic Regular Expressions) nor ERE (Extended Regular Expressions) support non-greedy/lazy matching. PCRE (Perl-Compatible Regular Expressions) should support non-greedy/lazy matching but the used grep seems to lack the -P (Perl) option.
Example command that reproduces the issue:
echo '"AO486;UART115200:4000000(Turbo 115200),MIDI;' | grep -oE -m1 '".*?;'
Result:
"AO486;UART115200:4000000(Turbo 115200),MIDI;
A possible fix could be avoiding non-greedy/lazy matching in the regular expression of the grep command, e.g.:
echo '"AO486;UART115200:4000000(Turbo 115200),MIDI;' | grep -oE -m1 '"[^;]*;'
Result:
"AO486;
The fixes from @cdewit have been merged, I think this issue can be closed @stefanerwinmayer
SD card created with: Mr. Fusion v2.2
There seems to be an issue with how the internal names of cores are built (Line 809 presumably the culprit). Running the updater for the first time on a new sd card produces partially the following in the logs:
Thank you very much for all your efforts!