Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1750891 - font cache not getting update on Silverblue 31?
Summary: font cache not getting update on Silverblue 31?
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fontconfig
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-10 16:43 UTC by Parag Nemade
Modified: 2020-08-01 16:09 UTC (History)
19 users (show)

Fixed In Version: fontconfig-2.13.92-9.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 02:31:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Parag Nemade 2019-09-10 16:43:33 UTC
Description of problem:
I have this system state

[parag@localhost ~]$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
● ostree://fedora:fedora/31/x86_64/silverblue
                   Version: 31.20190909.n.0 (2019-09-09T08:24:14Z)
                BaseCommit: 093a07e18c0514e47e978c9c33ef73a2615117db343e0eef7218c298b1e3502c
              GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4
           LayeredPackages: gedit gnome-tweaks hunspell-hi langpacks-hi libreoffice-core

  ostree://fedora:fedora/31/x86_64/silverblue
                   Version: 31.20190909.n.0 (2019-09-09T08:24:14Z)
                BaseCommit: 093a07e18c0514e47e978c9c33ef73a2615117db343e0eef7218c298b1e3502c
              GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4
           LayeredPackages: gedit gnome-tweaks hunspell-hi libreoffice-core
[parag@localhost ~]$ rpm-ostree db diff
ostree diff commit from: rollback deployment (0ad271d38c5aa4e1ce194ea625f83862d2c317774d96ba9b94d53c5324133265)
ostree diff commit to:   booted deployment (61f7aea98b458e53e42e85131e62ad7c84f80592676f28949cc5aa411e34ff55)
Added:
  glibc-langpack-hi-2.30-1.fc31.x86_64
  google-noto-sans-devanagari-ui-vf-fonts-20181223-6.fc31.noarch
  google-noto-sans-devanagari-vf-fonts-20181223-6.fc31.noarch
  hyphen-hi-1:0.7.0-14.fc31.noarch
  langpacks-core-hi-2.0-6.fc31.noarch
  langpacks-hi-2.0-6.fc31.noarch
  libreoffice-help-hi-1:6.3.1.2-1.fc31.x86_64
  libreoffice-langpack-hi-1:6.3.1.2-1.fc31.x86_64
  samyak-devanagari-fonts-1.2.2-22.fc31.noarch
  samyak-fonts-common-1.2.2-22.fc31.noarch
[parag@localhost ~]$ fc-list :lang=hi
/usr/share/fonts/lohit-devanagari/Lohit-Devanagari.ttf: Lohit Devanagari:style=Regular
/usr/share/fonts/google-droid/DroidSansDevanagari-Regular.ttf: Droid Sans:style=Regular
[parag@localhost ~]$ 


Version-Release number of selected component (if applicable):
fontconfig-2.13.92-2.fc31.x86_64

How reproducible:
always

Steps to Reproduce:
1. on F31, install any langpacks which will install additional fonts packages like langpacks-hi
2. execute fc-list :lang=hi
3.

Actual results:
"fc-list :lang=hi" output remained same

Expected results:
"fc-list :lang=hi" should included rencently installed font packages as well

Additional info:

Comment 1 Akira TAGOH 2019-09-12 06:30:17 UTC
Hmm, that seems similar issue we've met with ibus cache:

$ rpm-ostree db diff
ostree diff commit from: rollback deployment (fbaac5f3877d7dc590a43948eb4c832b47d0a5e85a221dc6789bac161628e351)
ostree diff commit to:   booted deployment (51d39a14af65893fbdd0c8a21733c9f1f7ccf6826cc9c1dfaf3ddd825b4bebd9)
Added:
  glibc-langpack-hi-2.30-1.fc31.x86_64
  google-noto-sans-devanagari-ui-vf-fonts-20181223-6.fc31.noarch
  google-noto-sans-devanagari-vf-fonts-20181223-6.fc31.noarch
  hunspell-hi-1:1.0.0-12.fc31.noarch
  hyphen-hi-1:0.7.0-14.fc31.noarch
  langpacks-core-hi-2.0-6.fc31.noarch
  langpacks-hi-2.0-6.fc31.noarch
  samyak-devanagari-fonts-1.2.2-22.fc31.noarch
  samyak-fonts-common-1.2.2-22.fc31.noarch
$ diff -pruN <(ls --color=no -1 /sysroot/ostree/deploy/fedora-workstation/deploy/fbaac5f3877d7dc590a43948eb4c832b47d0a5e85a221dc6789bac161628e351.0/usr/lib/fontconfig/cache/ |sort) <(ls --color=no -1 /sysroot/ostree/deploy/fedora-workstation/deploy/51d39a14af65893fbdd0c8a21733c9f1f7ccf6826cc9c1dfaf3ddd825b4bebd9.0/usr/lib/fontconfig/cache/|sort)
--- /dev/fd/63	2019-09-12 15:16:02.848180258 +0900
+++ /dev/fd/62	2019-09-12 15:16:02.849180258 +0900
@@ -6,6 +6,7 @@
 210c0516121708a580e22e6b1f9a103a-le64.cache-7
 26078b1cf62d7535e9fc9c56a8803883-le64.cache-7
 2881ed3fd21ca306ddad6f9b0dd3189f-le64.cache-7
+30b9c3e04f780095e7cb0ae44a315810-le64.cache-7
 3830d5c3ddfd5cd38a049b759396e72e-le64.cache-7
 3c3fb04d32a5211b073874b125d29701-le64.cache-7
 3e9ca894d7ccd8b9fedb236c4f3f7c4e-le64.cache-7
@@ -30,6 +31,7 @@ b4d0b56f766d89640448751fcd18ec1e-le64.ca
 b887eea8f1b96e1d899b44ed6681fc27-le64.cache-7
 cf759820c416606818fc74e5e9991313-le64.cache-7
 d3379abda271c4acd2ad0c01f565d0b0-le64.cache-7
+d63f98f14a274bd69a5425fc33aaac6b-le64.cache-7
 df893b4576ad6107f9397134092c4059-le64.cache-7
 e26bf336397aae6fcef4d3803472adec-le64.cache-7
 e34b99a1e22e6f7451938fb9934274e6-le64.cache-7
$ strings /sysroot/ostree/deploy/fedora-workstation/deploy/51d39a14af65893fbdd0c8a21733c9f1f7ccf6826cc9c1dfaf3ddd825b4bebd9.0/usr/lib/fontconfig/cache/30b9c3e04f780095e7cb0ae44a315810-le64.cache-7 | grep ttf
/usr/share/fonts/samyak/Samyak-Devanagari.ttf
$ strings /sysroot/ostree/deploy/fedora-workstation/deploy/51d39a14af65893fbdd0c8a21733c9f1f7ccf6826cc9c1dfaf3ddd825b4bebd9.0/usr/lib/fontconfig/cache/d63f98f14a274bd69a5425fc33aaac6b-le64.cache-7 | grep ttf | head -1
/usr/share/fonts/google-noto-vf/NotoSansDevanagari-VF.ttf

Comment 2 Akira TAGOH 2019-09-12 06:53:51 UTC
Erm, difference must be three not two. one is a cache for /usr/share/fonts/samyak. one if a cache for /usr/share/fonts/google-noto-vf. and another one which apparently we are missing here is a cache for /usr/share/fonts.

That looks like a race again.

Comment 3 Akira TAGOH 2019-09-12 10:06:31 UTC
Hmm, actually this seems not race. because this happens even when installing one package. see:

$ rpm-ostree db diff
ostree diff commit from: rollback deployment (fbaac5f3877d7dc590a43948eb4c832b47d0a5e85a221dc6789bac161628e351)
ostree diff commit to:   booted deployment (798e14ea8bdc3ea82650996239a31d0bd0946575d019b832b393ded7d696f9ed)
Added:
  samyak-devanagari-fonts-1.2.2-22.fc31.noarch
  samyak-fonts-common-1.2.2-22.fc31.noarch
$ diff -pruN <(ls --color=no -1 /sysroot/ostree/deploy/fedora-workstation/deploy/fbaac5f3877d7dc590a43948eb4c832b47d0a5e85a221dc6789bac161628e351.0/usr/lib/fontconfig/cache/) <(ls --color=no -1 /sysroot/ostree/deploy/fedora-workstation/deploy/798e14ea8bdc3ea82650996239a31d0bd0946575d019b832b393ded7d696f9ed.0/usr/lib/fontconfig/cache/)
--- /dev/fd/63	2019-09-12 18:51:32.920178932 +0900
+++ /dev/fd/62	2019-09-12 18:51:32.921178932 +0900
@@ -6,6 +6,7 @@
 210c0516121708a580e22e6b1f9a103a-le64.cache-7
 26078b1cf62d7535e9fc9c56a8803883-le64.cache-7
 2881ed3fd21ca306ddad6f9b0dd3189f-le64.cache-7
+30b9c3e04f780095e7cb0ae44a315810-le64.cache-7
 3830d5c3ddfd5cd38a049b759396e72e-le64.cache-7
 3c3fb04d32a5211b073874b125d29701-le64.cache-7
 3e9ca894d7ccd8b9fedb236c4f3f7c4e-le64.cache-7

The above newly created cache is for /usr/share/fonts/samyak. we're still missing one more updates here.
Updating the cache for /usr/share/fonts failed somehow. I don't know what exactly happened during the package installation. need some comments from ostree guys. so reassigning to ostree so far.

Comment 4 Akira TAGOH 2019-09-13 06:32:23 UTC
Hmm, sorry, it wasn't accurate. trying again...

Comment 5 Akira TAGOH 2019-09-13 07:21:13 UTC
Okay, got it. moving back to fontconfig.

Please make sure if you don't have fontconfig caches on $HOME/.cache/fontconfig. that prevents using updated system caches because ostree resets the mtime to @0.

Comment 6 Calvin Walton 2020-02-09 04:29:38 UTC
I was hitting this, and I can confirm that deleting the fontconfig cache in $HOME/.cache/fontconfig was sufficient to get the new fonts to show up.
But the cache files in my home directory were regenerated immediately afterwards, so presumably this issue will be seen again any time system fonts are changed (regardless of whether they're part of the base image or installed with rpm-ostree).

Comment 7 Akira TAGOH 2020-02-10 05:16:46 UTC
Yes, see https://github.com/fedora-silverblue/issue-tracker/issues/28#issuecomment-579103999 for more details. for 2) I've applied a patch to fontconfig in rawhide so that it can read the latest caches anyway.

We may need to take some actions for 1 and 3 in ostree or workaround in fontconfig in case of ostree-based distro. reassigning again to ostree for some feedback on it.

Comment 8 Akira TAGOH 2020-04-23 09:26:30 UTC
Still seeing this issue on even f32 and decided to have a workaround for this issue in fontconfig.

Basically we won't see any changes against system files on Silverblue without reboot. so we can consider system caches for system fonts is always latest even if we have user caches for system fonts by fc-cache -f.

Because of that reason, I've patched fontconfig out to ignore non-zero timestamped caches for zero timestamped directories and fonts.

Comment 9 Fedora Update System 2020-04-23 11:13:47 UTC
FEDORA-2020-c710e5c2c9 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-c710e5c2c9

Comment 10 Fedora Update System 2020-04-23 20:45:52 UTC
FEDORA-2020-c710e5c2c9 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c710e5c2c9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c710e5c2c9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2020-04-28 02:31:14 UTC
FEDORA-2020-c710e5c2c9 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Chris St. Louis 2020-08-01 16:09:37 UTC
I think this issue still persists, in some form, with fontconfig-2.13.92-9 on Fedora 32. I have a number of manually installed fonts in /usr/share/fonts and generally run 'sudo fc-cache -fsv' to update the font cache. I don't quite remember the exact sequence of events, but I think at one point a few weeks ago I only ran 'fc-cache -fv' (which would have generated font caches in the user's home directory, if I understand correctly). At this point, I discovered that certain fonts were not available to the system and wouldn't appear in the list produced by 'fc-list', though running 'sudo fc-cache -fsv' would make all fonts available again. This would not persist after shutting down, though, and on the next boot some fonts would be unavailable again.

Deleting the cache files in ~/.cache/fontconfig/ seemed to make all installed fonts immediately visible again, and the fix seems to persist across reboots.


Note You need to log in before you can comment on or make changes to this bug.