Re: fix for unaligned accesses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patrick Lam <plam@xxxxxxx> さんは書きました:

> Mike FABIAN wrote:
>> Patch by Andreas Schwab <schwab@xxxxxxx>.
>> 
>> See also:
>> 
>> http://bugzilla.novell.com/show_bug.cgi?id=142215
>
> Looks good, I've committed it.
>
> Are there any of the /var/cache/fontconfig bugs still outstanding?  I'll
> try to take a look at any leftover ones there sooner or later, if folks
> let me know what's up...

I think there are still problems with the normalizing of the font
directory names.

I posted a patch to this list recently to fix the problem that

    fc-cache /usr/share/fonts
    fc-cache /usr/share/fonts/
    cd /usr/share/fonts; fc-cache .

generate different cache files, but this patch had the problem that
it neede to call FcInitLoadConfigAndFonts () instead of
FcInitLoadConfig () to be able to use FcConfigNormalizeFontDir().

But this has the severe disadvantage that  FcInitLoadConfigAndFonts ()
is very expensive, therefore this is not a good solution.

Frederic Crozat's approach using realpath () worked much better.

But you said realpath () cannot be used because it appears to be
problematic and not portable according to its man-page.

Yesterday Rüdiger Oertel <ro@xxxxxxx> had the idea to use the inodes
and device ids of the directory to cache to create the md5sums for the
file names of the cache files and Dirk Mueller <dmueller@xxxxxxx> made
a patch to try this approach.

This idea seems to have the problem that for some file systems
inodes may change when mounting the same file system again.
For example with a vfat file system:

    root@magellan:~# mount | grep mnt
    /tmp/image on /mnt type vfat (rw,loop=/dev/loop0)
    root@magellan:~# ls -i /mnt
    1157 a*  1158 b*  1159 c*  1160 d*  1161 e*  1162 f*  1163 g*  1164 h*
    root@magellan:~# umount /mnt 
    root@magellan:~# mount -o loop  /tmp/image  /mnt
    root@magellan:~# ls -i /mnt
    1173 a*  1174 b*  1175 c*  1176 d*  1177 e*  1178 f*  1179 g*  1180 h*
    root@magellan:~# 

The inodes were different when mounting the file system the second
time.

I.e. if one has a windows system with a vfat partition and adds the
font directory of the windows system to the search path of fontconfig,
the caches in /var/cache/fontconfig will probably appear to be missing
after each boot just because the inodes on the windows partition have
changed.

Maybe using something like realpath() is the best solution after all.

Takashi Iwai <tiwai@xxxxxxx> had the idea that realpath can be
emulated portably using chdir() and getcwd().

That sounds like a solution which really could work portably.

-- 
Mike FABIAN   <mfabian@xxxxxxx>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux