WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: getlocale.sh broken on pi  (Read 128 times)

Offline vext01

  • Newbie
  • *
  • Posts: 20
getlocale.sh broken on pi
« on: June 11, 2026, 05:09:23 PM »
Hi,

As mentioned in https://forum.tinycorelinux.net/index.php?topic=28163.0, getlocale.sh is currently broken, at least on picore.

When I first ran it, it just exits silently. This was for two reasons:
  • It didn't like TERM=alacritty (vt100 was fine)
  • It writes a bogus dialog scrpt

This diff fixes the latter:
Code: [Select]
--- /usr/local/bin/getlocale.sh 2014-01-15 11:26:39.000000000 +0000
+++ getlocale.sh 2026-06-06 19:19:01.000000000 +0000
@@ -10,7 +10,7 @@

 echo "--separate-output --checklist \"Choose which locales to support:\" 0 42 10 " > $temp2
 for i in `cat $SFILE`; do
- echo "$i \" \" off \\" >> $temp2
+ echo "$i \" \" off" >> $temp2
 done

 dialog --file $temp2 2> $tempfile

This is on:
Code: [Select]
NAME=piCore
VERSION="16.0"

I've seen this now on both 32 and 64 bit raspberry pi.

Cheers

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12840
Re: getlocale.sh broken on pi
« Reply #1 on: June 12, 2026, 11:47:43 AM »
Hi vext01
What happens if you do it this way:
Code: [Select]
tc@E310:~$ diff -u /tmp/tcloop/getlocale/usr/local/bin/getlocale.sh /usr/local/bin/getlocale.sh
--- /tmp/tcloop/getlocale/usr/local/bin/getlocale.sh    2014-01-15 11:26:39.000000000 +0000
+++ /usr/local/bin/getlocale.sh 2026-06-12 11:30:53.339562305 +0000
@@ -13,6 +13,8 @@
        echo "$i \" \" off \\" >> $temp2
 done
 
+echo >> $temp2
+
 dialog --file $temp2 2> $tempfile
 
 [ "$?" -ne 0 ] && exit 1
That should fix it too.

I don't like the idea of removing the line continuation characters.

Offline vext01

  • Newbie
  • *
  • Posts: 20
Re: getlocale.sh broken on pi
« Reply #2 on: June 12, 2026, 06:41:16 PM »
Hi,

Applied the diff, but it's not right.

Code: [Select]
$ sudo sh -x getlocale.sh
...
+ echo 'zu_ZA/ISO-8859-1 " " off \'
+ echo
+ dialog --file /tmp/tmp.Q3Gl3zv17I
+ '[' 255 -ne 0 ]
+ exit 1

Code: [Select]
$ sudo dialog --file /tmp/tmp.Q3Gl3zv17I

Error: Expected 3 arguments, found extra 1.
Use --help to list options.

Code: [Select]
$ sudo less /tmp/tmp.Q3Gl3zv17I
--separate-output --checklist "Choose which locales to support:" 0 42 10
aa_DJ.UTF-8/UTF-8 " " off \
aa_DJ/ISO-8859-1 " " off \
aa_ER/UTF-8 " " off \
aa_ER@saaho/UTF-8 " " off \
...

These backslashes on the end of the dialog file are not right.