WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: sanity checks for getlocale.sh  (Read 1653 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1465
sanity checks for getlocale.sh
« on: February 10, 2020, 03:56:41 PM »
curaga, I created a patch for the getlocale.sh script (part of getlocale.tcz). I hope it's helpful.

The purpose is to give the user a red-letter warning in situations where the script is unlikely to work as intended:

1. if the script is running while a prior  mylocale.tcz  is loaded
2. if the  localedef  step fails
3. if the generated  mylocale.tcz  has a nonsensical size

Any of the above warnings would have prevented me from chasing my tail when using getlocale.tcz in the recent past.
« Last Edit: February 10, 2020, 03:59:18 PM by GNUser »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11035
Re: sanity checks for getlocale.sh
« Reply #1 on: February 11, 2020, 03:50:55 AM »
The last two are ok, but instead of warning for an existing mylocale.tcz, it should be ok to sudo rm the existing locale archive.
The only barriers that can stop you are the ones you create yourself.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1465
Re: sanity checks for getlocale.sh
« Reply #2 on: February 11, 2020, 08:20:20 AM »
I have to admit that's a much better idea. How about this?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11035
Re: sanity checks for getlocale.sh
« Reply #3 on: February 11, 2020, 12:54:30 PM »
Thanks! Posted to 11.x x86 and x86_64.
The only barriers that can stop you are the ones you create yourself.