Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 2004 05:16:04 +0200
From:      "\"Christian Hiris\" <Christian Hiris" <4711@chello.at>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/65515: x11/kdebase3: startkde - setting fontpath to user-installed font-directory fails
Message-ID:  <1081912564.0@matrix010.matrix.net>
Resent-Message-ID: <200404140330.i3E3UKHC010337@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         65515
>Category:       ports
>Synopsis:       x11/kdebase3: startkde - setting fontpath to user-installed font-directory fails
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 13 20:30:20 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Christian Hiris
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:


System: FreeBSD 5.2-CURRENT #0: Mon Apr 12 21:28:35 CEST 2004 build@matrix010.matrix.net:/usr/obj/usr/src/sys/MATRIX010
kdebase-3.2.1


>Description:


The kde startup script fails when parsing the file '~/.fonts/fontpaths' which contains the paths to user-installed  font-directories in kde. As a result fonts installed in such directories stay invisible to non-kde-apps. Parsing of the '~/.fonts/fontpaths' file fails because IFS=$'/n' in the startkde shell-script does not set the (FreeBSD shell's) IFS to 'newline'. 


>How-To-Repeat:


1. Start kde 
2. Start the font-installer: kcmshell kcmfontinst
3. Create a new fonts-folder in fonts:/Personal (ie. myfolder)
4. Add fonts to the newly created folder.
5. Close the font-installer.
6. Logout 
7. Set xtrace argument in startkde script (#!/bin/sh -x)
8. Start kde
9. Watch the output of the startkde script(ie. in ~/.xsession-errors):

[...]
+ usr_odir=/home/test/.fonts/kde-override
+ usr_fdir=/home/test/.fonts
+ kde_fontpaths=/home/test/.fonts/fontpaths
+ do_usr_fdir=1
+ do_usr_odir=1
+ test -r /home/test/.fonts/fontpaths
+ savifs=

+ IFS=$/n
+ grep -v ^[   ]*#
+ echo+ sed ~ s:~:
 home test:g
sed: 1: "s:~:": unterminated substitute in regular expression
+ rfpath=
+ test -s /fonts.dir
+ echo+ sed .fo s:~:
 home test:g
sed: 1: "s:~:": unterminated substitute in regular expression
+ rfpath=
+ test -s /fonts.dir
+ echo+ sed ts
~ s:~:
 home test:g
sed: 1: "s:~:": unterminated substitute in regular expression
+ rfpath=
+ test -s /fonts.dir
+ echo .fo+ sed
 s:~: home test:g
sed: 1: "s:~:": unterminated substitute in regular expression
+ rfpath=
+ test -s /fonts.dir
+ echo+ sed ts s:~:
 home test:g
sed: 1: "s:~:": unterminated substitute in regular expression
+ rfpath=
+ test -s /fonts.dir
+ echo myfolder+ sed
 s:~: home test:g
sed: 1: "s:~:": unterminated substitute in regular expression
+ rfpath=
+ test -s /fonts.dir
+ IFS=

[...]



>Fix:


startkde xtrace after patching:

[...]
+ usr_odir=/home/test/.fonts/kde-override
+ usr_fdir=/home/test/.fonts
+ kde_fontpaths=/home/test/.fonts/fontpaths
+ do_usr_fdir=1
+ do_usr_odir=1
+ test -r /home/test/.fonts/fontpaths
+ savifs=

+ IFS=

+ grep -v ^[   ]*#
+ echo+ sed ~/.fonts s:~:/home/test:g

+ rfpath=/home/test/.fonts
+ test -s /home/test/.fonts/fonts.dir
+ xset fp+ /home/test/.fonts
+ test /home/test/.fonts = /home/test/.fonts
+ do_usr_fdir=0
+ test /home/test/.fonts = /home/test/.fonts/kde-override
+ echo+ sed ~/.fonts/myfolder s:~:/home/test:g

+ rfpath=/home/test/.fonts/myfolder
+ test -s /home/test/.fonts/myfolder/fonts.dir
+ xset fp+ /home/test/.fonts/myfolder
+ test /home/test/.fonts/myfolder = /home/test/.fonts
+ test /home/test/.fonts/myfolder = /home/test/.fonts/kde-override
+ IFS=

[...]


--- patch-startkde begins here ---
--- startkde.orig	Sun Oct 26 11:45:35 2003
+++ startkde	Thu Apr  8 12:20:47 2004
@@ -59,7 +59,7 @@
 do_usr_odir=1
 if test -r "$kde_fontpaths" ; then
     savifs=$IFS
-    IFS=$'\n'
+    IFS=${IFS#??}
     for fpath in `grep -v '^[   ]*#' < "$kde_fontpaths"` ; do
         rfpath=`echo $fpath | sed s:\~:$HOME:g`
         if test -s "$rfpath"/fonts.dir; then
--- patch-startkde ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1081912564.0>