Control: tag -1 + patch Control: forwarded -1 https://bugs.freedesktop.org/show_bug.cgi?id=96896
On Fri, 24 Jun 2016, Raphaël Hertzog wrote: > So please make sure that the fontconfig cache update ignores any > .dpkg-tmp file... Please find attached some untested patch. I'm going to test this in Kali. > Still I wonder how this is even possible as when the fontconfig trigger > runs, the packages are fully unpacked and those files should have been > already insalled under their final name. Maybe GNOME has some inotify > thing in place to update the cache dynamically? In any case, ignoring > those files at the fontconfig level should fix this issue I believe. I'm not sure how the system-wide and user cache interact but I found out that gnome-settings-daemon monitor the font directories and runs !FcConfigUptoDate (NULL) && FcInitReinitialize () when the monitor issues a change notification, see http://sources.debian.net/src/gnome-settings-daemon/3.20.1-2/plugins/xsettings/fontconfig-monitor.c/#L42 Cheers, -- Raphaël Hertzog ◈ Debian Developer Support Debian LTS: http://www.freexian.com/services/debian-lts.html Learn to master Debian: http://debian-handbook.info/get/
diff -Nru fontconfig-2.11.0/debian/changelog fontconfig-2.11.0/debian/changelog --- fontconfig-2.11.0/debian/changelog 2016-03-12 19:01:15.000000000 +0100 +++ fontconfig-2.11.0/debian/changelog 2016-07-12 11:06:43.000000000 +0200 @@ -1,3 +1,10 @@ +fontconfig (2.11.0-6.5) unstable; urgency=medium + + * Non-maintainer upload. + * Skip .dpkg-tmp files when updating the cache. Closes: #828037 + + -- Raphaël Hertzog <hert...@debian.org> Tue, 12 Jul 2016 10:49:07 +0200 + fontconfig (2.11.0-6.4) unstable; urgency=medium * Non-maintainer upload. diff -Nru fontconfig-2.11.0/debian/patches/07_skip_dpkg_tmp_files.patch fontconfig-2.11.0/debian/patches/07_skip_dpkg_tmp_files.patch --- fontconfig-2.11.0/debian/patches/07_skip_dpkg_tmp_files.patch 1970-01-01 01:00:00.000000000 +0100 +++ fontconfig-2.11.0/debian/patches/07_skip_dpkg_tmp_files.patch 2016-07-12 10:48:55.000000000 +0200 @@ -0,0 +1,19 @@ +diff --git a/src/fcdir.c b/src/fcdir.c +index fd62a34..edfa121 100644 +--- a/src/fcdir.c ++++ b/src/fcdir.c +@@ -283,7 +283,13 @@ FcDirScanConfig (FcFontSet *set, + } + while ((e = readdir (d))) + { +- if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN) ++ size_t length_name = strlen (e->d_name); ++ /* Skip temporary dpkg files */ ++ #define DPKG_TMP ".dpkg-tmp" ++ if (length_name > strlen(DPKG_TMP) && ++ strcmp(e->d_name + length_name - strlen(DPKG_TMP), DPKG_TMP) == 0) ++ continue; ++ if (e->d_name[0] != '.' && length_name < FC_MAX_FILE_LEN) + { + strcpy ((char *) base, (char *) e->d_name); + if (!FcStrSetAdd (files, file)) { diff -Nru fontconfig-2.11.0/debian/patches/series fontconfig-2.11.0/debian/patches/series --- fontconfig-2.11.0/debian/patches/series 2016-03-12 18:56:21.000000000 +0100 +++ fontconfig-2.11.0/debian/patches/series 2016-07-12 10:49:03.000000000 +0200 @@ -4,3 +4,4 @@ 04_mgopen_fonts.patch 05_doc_files.patch 06_cross.patch +07_skip_dpkg_tmp_files.patch