[MacPorts] #44566: fontconfig: fc-cache fails on AFP/SMB homes, cache rebuilt on every launch
#44566: fontconfig: fc-cache fails on AFP/SMB homes, cache rebuilt on every launch -----------------------------+-------------------------------- Reporter: michael-lists@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Keywords: | Port: fontconfig -----------------------------+-------------------------------- Our user accounts have their home directories on an AFP or SMB server. If the fontconfig cache is outdated (e.g. because fonts have been added to /Library/Fonts since fontconfig was last updated via MacPorts), it gets rebuilt when you run {{{fc-cache}}} or use a program that depends on fontconfig (such as gnuplot when outputting to PDF). Unfortunately, fontconfig fails to successfully build a cache at ~/.cache/fontconfig if that folder is on a network home directory. This means that the lengthy caching procedure (1-3 minutes) is run every time a program depending on fontconfig is run. The caching issue can be fixed by applying the following patch: {{{ --- src/fcatomic.c.orig 2012-05-28 15:58:56.000000000 +0900 +++ src/fcatomic.c 2014-08-07 11:47:45.000000000 +0200 @@ -131,7 +131,7 @@ FcAtomicLock (FcAtomic *atomic) return FcFalse; } ret = link ((char *) atomic->tmp, (char *) atomic->lck); - if (ret < 0 && errno == EPERM) + if (ret < 0 && (errno == EPERM || errno == ENOTSUP)) { /* the filesystem where atomic->lck points to may not supports * the hard link. so better try to fallback }}} and adding it to the Portfile: {{{ --- /tmp/Portfile 2014-08-07 11:49:34.000000000 +0200 +++ /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/fontconfig/Portfile 2014-08-07 11:50:31.000000000 +0200 @@ -38,7 +38,7 @@ lappend add_fonts ${prefix}/share/fonts set docdir ${prefix}/share/doc/${name} -patchfiles patch-docbook-4.2.diff +patchfiles patch-docbook-4.2.diff patch-fcatomic.diff # *** No scandir function available. # https://bugs.freedesktop.org/show_bug.cgi?id=77034 }}} An identical bug affecting the Haiku operating system was reported upstream two years ago (see https://bugs.freedesktop.org/show_bug.cgi?id=30077#c17) and ended up being closed because by POSIX, ''link()'' should only return ''EPERM'' in this situation, i.e. this is an OS bug and not a fontconfig bug. We could try reporting it anyway, but in the meantime a patch in MacPorts would be helpful. -- Ticket URL: <https://trac.macports.org/ticket/44566> MacPorts <http://www.macports.org/> Ports system for OS X
#44566: fontconfig: fc-cache fails on AFP/SMB homes, cache rebuilt on every launch ------------------------------+-------------------------- Reporter: michael-lists@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: Port: fontconfig | ------------------------------+-------------------------- Changes (by mf2k@…): * owner: macports-tickets@… => ryandesign@… * cc: michael-lists@… (removed) Comment: In the future, please Cc the port maintainers ({{{port info --maintainers fontconfig}}}). As reporter, you do not need to Cc yourself. -- Ticket URL: <https://trac.macports.org/ticket/44566#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#44566: fontconfig: fc-cache fails on AFP/SMB homes, cache rebuilt on every launch ------------------------------+-------------------------- Reporter: michael-lists@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: Port: fontconfig | ------------------------------+-------------------------- Comment (by ryandesign@…): Yes, this should be reported to the developers of fontconfig. I don't like committing to forever maintaining a patch that is not specific to MacPorts' needs. -- Ticket URL: <https://trac.macports.org/ticket/44566#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#44566: fontconfig: fc-cache fails on AFP/SMB homes, cache rebuilt on every launch ------------------------------+-------------------------- Reporter: michael-lists@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: Port: fontconfig | ------------------------------+-------------------------- Comment (by michael-lists@…): I reported the bug on Friday (https://bugs.freedesktop.org/show_bug.cgi?id=82358) and it was just fixed today: http://cgit.freedesktop.org/fontconfig/commit/?id=841753a93f0e5698663b7931b8.... As the next fontconfig release is probably still several months away, including the patch against the current version in MacPorts would be helpful. -- Ticket URL: <https://trac.macports.org/ticket/44566#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts