1

I've been using Arch for about 3-4 months now and I've never actually had to deal with an upgrade error. Yesterday when I ran sudo pacman -Syu I got

:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (2) fontconfig-1:2.13.1-1  librsvg-2:2.44.2-1

Total Download Size:   1.81 MiB
Total Installed Size:  6.09 MiB
Net Upgrade Size:      0.06 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 fontconfig-1:2.13.1-1-x86_64                          871.8 KiB   830K/s 00:01 [#############################################] 100%
 librsvg-2:2.44.2-1-x86_64                             980.1 KiB  2.19M/s 00:00 [#############################################] 100%
(2/2) checking keys in keyring                                                  [#############################################] 100%
(2/2) checking package integrity                                                [#############################################] 100%
(2/2) loading package files                                                     [#############################################] 100%
(2/2) checking for file conflicts                                               [#############################################] 100%
(2/2) checking available disk space                                             [#############################################] 100%
:: Processing package changes...
(1/2) upgrading fontconfig                                                      [#############################################] 100%
Rebuilding fontconfig cache...Fontconfig error: "/etc/fonts/local.conf", line 1: XML or text declaration not at start of entity
/usr/share/fonts/OTF: failed to write cache
/usr/share/fonts/cyrillic: failed to write cache
/usr/share/fonts/encodings/large: failed to write cache
/usr/share/fonts/util: failed to write cache
 done.
(2/2) upgrading librsvg                                                         [#############################################] 100%
:: Running post-transaction hooks...
(1/2) Probing GDK-Pixbuf loader modules...
(2/2) Arming ConditionNeedsUpdate...

The front page of archlinux.org's last documented update failure was in July, and I never had to deal with it.

How do I even know if this is a significant error? My computer seems to be working fine, but I haven't rebooted yet. A failure to rewrite the font cache doesn't seem like a big deal, but I do not truly know.

Any advice?

Please note: I ask the question with the current title because I am interested especially in advice about how to pursue solutions to undocumented Arch update failures, in addition to the solution to this specific problem. I would ask the technical question "fontconfig update error" if that was all I was interested in.

update: per advice in the comments (@Mioriin) I have discovered my bug is practically meaningless. I am not going to delete the question, however. I am soliciting advice on steps to take after update failures in Arch

  • 1
    A good place to start would be the patch notes for the failed packages. – Mioriin Aug 31 '18 at 13:41
  • @Mioriin: Excellent advice, per your suggestion I found this thread on the arch forums and this bug report. I'm going to edit the question to make it more general about arch failures and steps to investigate because it seems my problem is pretty meaningless. – malan Aug 31 '18 at 13:47
4

It sounds like you are asking more about how to deal with unexpected outcomes from a system update, rather than any particular package. It also sounds like you are asking how to mitigate against this scenario in future. In accordance with your question, I will focus on these general issues rather anything to do with fontconfig specifically.

In Arch Linux there is no real way to mitigate against problems like this, except to regularly run your pacman -Syu or pacman -Syyu. Then when something goes wrong, it is usually easy to role back to a recent version that worked, and wait for a newer version that fixes the problem.

Eg, a recent kernel upgrade caused the wifi on my Arch Linux laptop to stop working. Since I update regularly, I was able to role back to another recent kernel using pacman -U /var/cache/pacman/pkg/<old-kernel>. Every now and then I try another upgrade to see if a newer kernel fixes the problem.

In my experience, these kinds of problems do happen occasionally, and usually become okay after some period of time. Maybe it will take a few months. Just keep trying. In the meantime, keep using an older version.

But, when you don't want to wait, and you get something mystifying in some package, there are a few strategies you can use. Looking at the problem you described, I would try at least a couple of approaches:

  • Google for something like "font config error" "XML or text declaration not at start of entity" or linux fonts "failed to write cache". (I'm not going to do that googling for you. You asked for strategies, not pat single-shot instructions for this exact problem ;) )
  • Noticing that the error seems to be related to the new fontconfig that is mentioned in the upgrade, use asp to investigate the way this package is built: asp checkout fontconfig. In the trunk directory you will find a PKGBUILD which shows how the package was built. It will give you steps to follow to try to reproduce the problem. That might help you figure out what went wrong. Or, if you think there is a real bug in play, it will let you frame things in terms that will make sense upstream.

When it comes to rebooting, indeed, a font problem does not seem to me like a reason not to reboot. Still, what's the worst that can happen? It isn't hard to create a liveusb from the latest Arch image, boot into that, chroot into your main system, and roll back to an older version before rebooting.

That is another strategy for dealing with Arch Linux problems: be around other computers where you can grab an iso to put on a usb for recovery in case something goes wrong ;)

Edit: It was requested that I add to the answer, that another good place to look is the patch/package notes on the Arch Linux website. Furthermore, I don't frequent the forums much these days, but in the past I found them valuable, so that is another place to try.

  • 2
    Thank you, cryptarch, and indeed your answer was spot on. Do you mind, however, incorporating @Mioriin's advice about checking the package notes on the archlinux.org website, because indeed that got to the heart of it pretty quickly (the fontconfig update glitch was a meaningless issue that will indeed be solved soon). – malan Aug 31 '18 at 13:59
  • No problems, that is done – cryptarch Sep 2 '18 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.