LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-05-2021, 06:20 PM   #1
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Rep: Reputation: 37
/etc/profile.d/libglib2.csh broken in latest glib2


The latest glib2 upgrade causes an Ambiguous output redirect error when attempting to login with csh/tcsh. This took quite a bit of digging to find this. In below /etc/profile.d/libglib2.csh script the offending line I am pretty sure is the redirect for locale charmap >2

For now I have reverted to the old libglib2.csh script but this should be fixed to adhere to csh/tcsh standards.


Code:
#!/bin/csh
#
# Description:  This script sets the environment variables G_FILENAME_ENCODING
# and G_BROKEN_FILENAMES for the glib-2.0 library.
#
# G_FILENAME_ENCODING
#       This environment variable can be set to a comma-separated list of
#       character set names.  GLib assumes that filenames are encoded in the
#       first character set from that list rather than in UTF-8.  The special
#       token "@locale" can be used to specify the character set for the
#       current locale.
#
# G_BROKEN_FILENAMES
#       If this environment variable is set, GLib assumes that filenames are
#       in the locale encoding rather than in UTF-8.

# Determine if the locale is UTF-8:
locale charmap 2> /dev/null | grep -q UTF-8
if ($status == 0) then
  setenv G_FILENAME_ENCODING "@locale"
endif

# It doesn't hurt to export this since G_FILENAME_ENCODING takes priority
# over G_BROKEN_FILENAMES:
setenv G_BROKEN_FILENAMES 1
 
Old 09-05-2021, 06:40 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
This has been fixed. Now:
Code:
#!/bin/csh
#
# Description:  This script sets the environment variables G_FILENAME_ENCODING
# and G_BROKEN_FILENAMES for the glib-2.0 library.
#
# G_FILENAME_ENCODING
#       This environment variable can be set to a comma-separated list of
#       character set names.  GLib assumes that filenames are encoded in the
#       first character set from that list rather than in UTF-8.  The special
#       token "@locale" can be used to specify the character set for the
#       current locale.
#
# G_BROKEN_FILENAMES
#       If this environment variable is set, GLib assumes that filenames are
#       in the locale encoding rather than in UTF-8.

# Determine if the locale is UTF-8:
locale charmap | grep -q UTF-8
if ($status == 0) then
  setenv G_FILENAME_ENCODING "@locale"
endif

# It doesn't hurt to export this since G_FILENAME_ENCODING takes priority
# over G_BROKEN_FILENAMES:
setenv G_BROKEN_FILENAMES 1
 
Old 09-05-2021, 06:42 PM   #3
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071
Quote:
Originally Posted by Didier Spaier View Post
This has been fixed. Now
Thx to you ;-)

Code:
Wed Sep  1 18:39:59 UTC 2021
a/util-linux-2.37.2-x86_64-2.txz:  Rebuilt.
  Rebuild with --disable-raw since the raw driver has been removed from the
  kernel. Thanks to nobodino and SeB.
ap/vim-8.2.3394-x86_64-1.txz:  Upgraded.
l/glib2-2.68.4-x86_64-2.txz:  Rebuilt.
  Better detect UTF-8 locales in libglib2.sh and libglib2.csh.
  Thanks to Didier Spaier.
...
 
Old 09-06-2021, 08:27 AM   #4
wirelessmc
Member
 
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183

Original Poster
Rep: Reputation: 37
Looks like it was fixed twice ;-)

Code:
l/glib2-2.68.4-x86_64-3.txz:  Rebuilt.
  /etc/profile.d/libglib2.csh: Don't use bash syntax. Thanks to theodore.s.
l/poppler-21.09.0-x86_64-1.txz:  Upgraded.
  Shared library .so-version bump.
l/python-pillow-8.3.2-x86_64-1.txz:  Upgraded.
+--------------------------+
Wed Sep  1 18:39:59 UTC 2021
a/util-linux-2.37.2-x86_64-2.txz:  Rebuilt.
  Rebuild with --disable-raw since the raw driver has been removed from the
  kernel. Thanks to nobodino and SeB.
ap/vim-8.2.3394-x86_64-1.txz:  Upgraded.
l/glib2-2.68.4-x86_64-2.txz:  Rebuilt.
  Better detect UTF-8 locales in libglib2.sh and libglib2.csh.
  Thanks to Didier Spaier.
 
Old 09-06-2021, 08:40 AM   #5
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,360

Rep: Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071Reputation: 4071
Quote:
Originally Posted by wirelessmc View Post
Looks like it was fixed twice ;-)
One for the money, two for the show
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Query on /etc/profile.d/glib2.sh GazL Slackware 7 06-14-2021 12:24 PM
colord-1.4.3 requires glib2-2.5.6 or greater but slackware 14.2 only ships with glib2-2.46.2 nimbusdin Slackware 8 08-19-2018 03:43 PM
Slackware64 current gtk+2 /etc/profile.d/gtk+.sh and .csh have uid 3356 aaazen Slackware 2 04-27-2015 09:13 AM
[SOLVED] Ownership of /etc/profile.d/gtk+.{sh,csh} in Slackware64 14.1 sanjioh Slackware 9 09-29-2014 09:22 PM
Can't install libglib2.0-dev from repo, returns "broken package" polemon DamnSmallLinux 0 10-09-2007 04:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration