FS#45983 - [fontconfig] preserve configuration during upgrade

Attached to Project: Arch Linux
Opened by Roman Kosenko (kite) - Friday, 14 August 2015, 10:42 GMT
Last edited by Andreas Radke (AndyRTR) - Tuesday, 10 November 2015, 13:45 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
If somebody made changes in /etc/fonts/conf.d/ (for example, remove some symlinks to /etc/fonts/cong.avail/ - this is normal way of configuration fontconfig) it will be overwritten by upgrade.
I think it's better to put these symlinks in post-install script and don't put symlinks on post-upgrade (put new symlink only for new config appears first in this version of fontconfig).


Additional info:
$ pacman -Q fontconfig
fontconfig 2.11.1-2


Steps to reproduce:
# rm /etc/fonts/conf.d/20-unhint-small-vera.conf
# pacman -S fontconfig
# ls -l /etc/fonts/conf.d/20-unhint-small-vera.conf
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Tuesday, 10 November 2015, 13:45 GMT
Reason for closing:  Won't fix
Comment by patrick (potomac) - Friday, 14 August 2015, 16:55 GMT
you could store your personnal configuration in your home instead of /etc/fonts,

https://wiki.archlinux.org/index.php/Font_configuration#Fontconfig_configuration

it can be a workaround for your problem, put the symlinks you want in your ~/fontconfig/conf.d/, like the wiki said "The settings in the per-user configuration have precedence over the global configuration. Both these files use the same syntax."
Comment by Roman Kosenko (kite) - Friday, 14 August 2015, 17:04 GMT
I want to *REMOVE* symlink. There is a workaround, of course - create a new config with opposite values of the all parameters. But I don't think this is proper way. ;)
P.S. And, of course, I want to do this globally in order to, for example, have proper font anti-aliasing on login screen.
Comment by Doug Newgard (Scimmia) - Friday, 14 August 2015, 17:06 GMT
Wouldn't pacman.conf's NoExract option work for that?
Comment by Roman Kosenko (kite) - Friday, 14 August 2015, 17:14 GMT
Doug Newgard, it seems like this option can help. But this is some kind of hack, this is not straight way of configuration.
Comment by Doug Newgard (Scimmia) - Friday, 14 August 2015, 17:24 GMT
What you're proposing seems like even more of a hack. Untracked files should be avoided if possible.
Comment by Roman Kosenko (kite) - Wednesday, 19 August 2015, 22:07 GMT
I don't think that untracked symlinks in /etc/ is a hack. This is the way of configuration fontconfig and some other software. Why do we need folder in /etc/ with symlinks if we cannot delete any symlink or add new untracked symlink?
Comment by Doug Newgard (Scimmia) - Wednesday, 19 August 2015, 22:43 GMT
I didn't say that you cannot delete or add symlinks, just that the package shouldn't be adding untracked files if it can help it. What you do from there is your own customization.
Comment by Jan de Groot (JGC) - Thursday, 20 August 2015, 08:18 GMT
We used to do this from post_install/post_upgrade. The logic required for this was unmaintainable and hard to understand.
Comment by Andreas Radke (AndyRTR) - Saturday, 22 August 2015, 13:00 GMT
The way we ship the package now is how upstream intends to ship the configuration. We don't apply any changes.

I suggest to go the somewhat ugly way and apply your reverting changes to custom systemwide or user specific conf files.

Loading...