Bug 148359 - fontconfig: strange warnings ...
Summary: fontconfig: strange warnings ...
Status: RESOLVED FIXED
: 149037 (view as bug list)
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Beta 4
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Mike Fabian
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-06 11:45 UTC by Michael Meeks
Modified: 2006-03-06 15:28 UTC (History)
6 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2006-02-06 11:45:45 UTC
So - all my apps are still statting all fonts on the system at start; so I upgraded to the latest/greatest fontconfig:

* Sun Feb 05 2006 - aj@suse.de
- Fix typo in suse-post-user.conf [#148268].

and - I re-ran SuSEconfig:

linux:~ # SuSEconfig 
Starting SuSEconfig, the SuSE Configuration Tool...
Running in full featured mode.
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.automake...
Executing /sbin/conf.d/SuSEconfig.desktop-file-utils...
Could not parse file '/usr/share/applications/javaws.desktop': Failed to open file '/usr/share/applications/javaws.desktop': No such file or directory
File '/opt/gnome/share/applications/totem.desktop' contains invalid MIME type 'DocPath=totem' that contains invalid characters
Executing /sbin/conf.d/SuSEconfig.fonts...
Creating fonts.{scale,dir} files .............
/etc/fonts/suse-hinting.conf unchanged
/etc/fonts/suse-bitmaps.conf unchanged
Creating cache files for Xft .....FC: cache for /usr/X11R6/lib/X11/fonts is outdated,
    consider running "fc-cache -f" as root!
FC: cache for /usr/X11R6/lib/X11/fonts is outdated,
    consider running "fc-cache -f" as root!
FC: cache for /usr/X11R6/lib/X11/fonts is outdated,
    consider running "fc-cache -f" as root!
................................

So - I ran:

linux:~ # fc-cache -f 

And I get the same results.
Comment 1 Dirk Mueller 2006-02-08 14:25:24 UTC
well, did you try with the latest fontconfig? there was an issue with /usr/X11 vs /usr/X11R6. 
Comment 2 Clinton Gormley 2006-02-08 15:06:54 UTC
(In reply to comment #1)
> well, did you try with the latest fontconfig? there was an issue with /usr/X11
> vs /usr/X11R6. 
> 

I'm using:
fontconfig-2.3.93.20060207-0.1
fonts-config-20060207-0.1

on suse 10.0

and I'm still getting these messages after running fc-cache -f

Comment 3 Dirk Mueller 2006-02-08 15:51:12 UTC
well, do you also get them after running SuSEconfig --module fonts ?
Comment 4 Clinton Gormley 2006-02-08 15:59:25 UTC
(In reply to comment #3)
> well, do you also get them after running SuSEconfig --module fonts ?
> 

Yes - see https://bugzilla.novell.com/show_bug.cgi?id=143715&x=0&y=0#c50
Comment 5 Takashi Iwai 2006-02-08 17:45:40 UTC
Do you have /usr/X11R6/lib/X11/fonts/fonts.cache-2 ?  If yes, remove it.

Also, please check the timestamp of /usr/X11R6/lib/X11/fonts directory.  Sometimes the date is screwed up.
Comment 6 Clinton Gormley 2006-02-08 18:02:38 UTC
(In reply to comment #5)
> Do you have /usr/X11R6/lib/X11/fonts/fonts.cache-2 ?  If yes, remove it.
> 

No fonts.cache-2 in that directory

> Also, please check the timestamp of /usr/X11R6/lib/X11/fonts directory. 
> Sometimes the date is screwed up.
> 

What do you mean by screwed up?
> ls /usr/X11R6/lib/X11/fonts
drwxr-xr-x  11 root root   296 2006-02-08 11:39 .
drwxr-xr-x  14 root root   856 2005-10-10 02:07 ..
drwxr-xr-x   2 root root 79768 2006-02-03 18:13 75dpi
drwxr-xr-x   2 root root   184 2006-02-03 17:56 CID
drwxr-xr-x   3 root root  1488 2006-02-03 17:56 encodings
drwxr-xr-x   2 root root   184 2006-02-03 17:56 local
drwxr-xr-x   2 root root 19776 2006-02-03 18:12 misc
drwxr-xr-x   2 root root 15600 2006-02-03 18:13 truetype
drwxr-xr-x   2 root root  2024 2006-02-03 18:13 Type1
drwxr-xr-x   2 root root   256 2006-02-03 18:13 uni
lrwxrwxrwx   1 root root    28 2006-02-03 18:11 URW -> /usr/share/ghostscript/fonts
drwxr-xr-x   2 root root   568 2006-02-03 17:56 util
Comment 7 Takashi Iwai 2006-02-08 18:20:23 UTC
Try the following to figure out which cache corresponds to that directory:

for i in /var/cache/fontconfig/*; do
fc-cat $i | head -1 | grep -q '/usr/X11R6/lib/X11/fonts/fonts.cache-2' && echo $i
done


Then, compare the timestamps between that cache file and /usr/X11R6/lib/X11/fonts directory.
Comment 8 Clinton Gormley 2006-02-08 18:36:59 UTC
(In reply to comment #7)
> Try the following to figure out which cache corresponds to that directory:
> 
> for i in /var/cache/fontconfig/*; do
> fc-cat $i | head -1 | grep -q '/usr/X11R6/lib/X11/fonts/fonts.cache-2' && echo
> $i
> done
> 
> 
> Then, compare the timestamps between that cache file and
> /usr/X11R6/lib/X11/fonts directory.
> 

Timestamp looks fine.  Even (after the process below) when I touch'ed the cache file so that the timestamp was a few minutes older than the directory, it still reports it as out of date.

>> fc-cache -fv 
fc-cache: "/usr/X11R6/lib/X11/fonts": caching, 0 fonts, 10 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/CID": caching, 0 fonts, 0 dirs
fc-cache: "/usr/share/ghostscript/fonts": caching, 43 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/uni": caching, 2 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/misc": caching, 144 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/util": caching, 0 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/75dpi": caching, 398 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/Type1": caching, 29 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/local": caching, 0 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/truetype": caching, 472 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/encodings": caching, 0 fonts, 1 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/encodings/large": caching, 0 fonts, 0 dirs
fc-cache: succeeded

>> # SuSEconfig --module fonts
Starting SuSEconfig, the SuSE Configuration Tool...
Running module fonts only
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.fonts...
Creating fonts.{scale,dir} files ..........
/etc/fonts/suse-font-dirs.conf unchanged
/etc/fonts/suse-hinting.conf unchanged
/etc/fonts/suse-bitmaps.conf unchanged
Creating cache files for Xft ..FC: cache for /usr/X11R6/lib/X11/fonts is outdated,
    consider running "fc-cache -f" as root!
FC: cache for /usr/X11R6/lib/X11/fonts is outdated,
    consider running "fc-cache -f" as root!
FC: cache for /usr/X11R6/lib/X11/fonts is outdated,
    consider running "fc-cache -f" as root!
.......................................
generating java font setup
writing /usr/lib/jvm/java-1.4.2-sun-1.4.2.10/jre/lib/font.properties.ja
Finished.

>> # ls -l /usr/X11R6/lib/X11/fonts
total 116
drwxr-xr-x  11 root root   296 2006-02-08 19:30 .
drwxr-xr-x  14 root root   856 2005-10-10 02:07 ..
drwxr-xr-x   2 root root 79768 2006-02-03 18:13 75dpi
drwxr-xr-x   2 root root   184 2006-02-03 17:56 CID
drwxr-xr-x   3 root root  1488 2006-02-03 17:56 encodings
drwxr-xr-x   2 root root   184 2006-02-03 17:56 local
drwxr-xr-x   2 root root 19776 2006-02-03 18:12 misc
drwxr-xr-x   2 root root 15600 2006-02-03 18:13 truetype
drwxr-xr-x   2 root root  2024 2006-02-03 18:13 Type1
drwxr-xr-x   2 root root   256 2006-02-03 18:13 uni
lrwxrwxrwx   1 root root    28 2006-02-03 18:11 URW -> /usr/share/ghostscript/fonts
drwxr-xr-x   2 root root   568 2006-02-03 17:56 util


>> # for i in /var/cache/fontconfig/*; do fc-cat $i | head -1 | grep -q '/usr/X11R6/lib/X11/fonts/fonts.cache-2' && echo $i; done

/var/cache/fontconfig/d6cbef6a154fbb58de4106ebbde5ea2b.cache-2

>> # ls -l /var/cache/fontconfig/d6cbef6a154fbb58de4106ebbde5ea2b.cache-2
-rw-r--r--  1 root root 4096 2006-02-08 19:30 /var/cache/fontconfig/d6cbef6a154fbb58de4106ebbde5ea2b.cache-2

>> fc-cat d6cbef6a154fbb58de4106ebbde5ea2b.cache-2
fc-cat: printing directory cache for cache which would be named /usr/X11R6/lib/X11/fonts/fonts.cache-2
"CID" 0 ".dir"
"URW" 0 ".dir"
"uni" 0 ".dir"
"misc" 0 ".dir"
"util" 0 ".dir"
"75dpi" 0 ".dir"
"Type1" 0 ".dir"
"local" 0 ".dir"
"truetype" 0 ".dir"
"encodings" 0 ".dir"

>> ls -l d6cbef6a154fbb58de4106ebbde5ea2b.cache-2
-rw-r--r--  1 root root 4096 2006-02-08 19:30 d6cbef6a154fbb58de4106ebbde5ea2b.cache-2
Comment 9 Clinton Gormley 2006-02-08 18:46:30 UTC
> Timestamp looks fine.  Even (after the process below) when I touch'ed the cache
> file so that the timestamp was a few minutes older than the directory, it still
> reports it as out of date.

Having said that, after running SuSEconfig --module fonts, the timestamp on /usr/X11R6/lib/X11/fonts is the same as the cache file, which might have something to do with it.
Comment 10 Takashi Iwai 2006-02-08 19:01:18 UTC
Yes, it sound strange.  SuSEconfig script seems touching the directory by any reason.

To be sure, just run "fc-cache -f", then run "fc-match sans".  Do you get any warnings?
Comment 11 Clinton Gormley 2006-02-08 19:11:05 UTC
(In reply to comment #10)
> Yes, it sound strange.  SuSEconfig script seems touching the directory by any
> reason.
> 
> To be sure, just run "fc-cache -f", then run "fc-match sans".  Do you get any
> warnings?

No warnings.

Problem seems to be these lines in : /sbin/conf.d/SuSEconfig.fonts

# test if not mounted readonly
test -d /usr/X11R6/lib/X11/fonts || exit 0
touch /usr/X11R6/lib/X11/fonts 2>/dev/null || exit 0

My SuSEconfig belongs to aaa_base-10.0-28

> 

Comment 12 Clinton Gormley 2006-02-08 19:14:41 UTC
(In reply to comment #11)

> 
> No warnings.
> 
> Problem seems to be these lines in : /sbin/conf.d/SuSEconfig.fonts
> 
> # test if not mounted readonly
> test -d /usr/X11R6/lib/X11/fonts || exit 0
> touch /usr/X11R6/lib/X11/fonts 2>/dev/null || exit 0

yes - sure enough - comment out the touch line and all is well.

Surely you just use a 'test -w'?

And now that you're writing to /var/cache/fontconfig, do you even need to test the writability of that directory?
Comment 13 Takashi Iwai 2006-02-08 19:27:41 UTC
"test -w" can't check the writability on the read-only mounted directory.  It checks only the file stat.

This test is anyway invalid with the recent fontconfig, indeed.  Possibly, other things like fonts.dir/scale update, CID links, etc may fail, but it can be ignored.
Comment 14 Mike Fabian 2006-02-09 16:22:15 UTC
*** Bug 149037 has been marked as a duplicate of this bug. ***
Comment 15 Mike Fabian 2006-02-10 11:15:21 UTC
Fixed for SuSE Linux 10.1 Beta5.

"fonts-config" packages for testing with Beta3/Beta4 are in

   ftp://ftp.suse.com/pub/projects/m17n/10.1/RPMS

Comment 16 Mike Fabian 2006-03-06 10:10:02 UTC
Move Product to SuSE Linux 10.1 to increase accessibility of this bug report.