Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27632 - media-libs/fontconfig-2.2.1 overwrites all files in /etc/fonts/ without notification.
Summary: media-libs/fontconfig-2.2.1 overwrites all files in /etc/fonts/ without notif...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: foser (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-30 22:46 UTC by Charlton Harrison
Modified: 2003-09-04 04:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charlton Harrison 2003-08-30 22:46:43 UTC
media-libs/fontconfig-2.2.1 overwrites all the files in /etc/fonts/ without
notification.
There are user-configurable files in this directory that should not be
overwritten but instead should allow to be merged with a utility like etc-update
or something.
It is very confusing to me why my fonts revert to being messed up after an
emerge and I had no idea why until I discovered that the fontconfig package
overwrote /etc files (?!).

Reproducible: Always
Steps to Reproduce:
1. emerge media-libs/fontconfig
2. witness your carefully configured (in /etc/fonts) fonts all messed up
3. data in /etc/fonts/ dir lost forever without notice.


Expected Results:  
the new files for /etc/fonts/* should be ._cfg0000_* named instead,  and then
merged like all other /etc config files in Gentoo linux.
Comment 1 Zhen Lin 2003-09-02 08:04:28 UTC
This is a feature, not a bug.

You get plenty of warning at the end of the build to not put your configuration options in fonts.conf.
Comment 2 Charlton Harrison 2003-09-02 08:14:28 UTC
Hmmm...
well what about /etc/fonts/local.conf ?
That gets overwritten too.

And if you're not supposed to set your config in /etc/fonts/* files,  why are they in the /etc/ sub-tree?  they should be in /usr/ or something.
Comment 3 foser (RETIRED) gentoo-dev 2003-09-02 13:12:49 UTC
because config files go in the /etc/ tree, they are not immutable you can change them if you want. We just don't recommend you doing it and go for local.conf or your users ~/fonts.conf . I just checked the fontconfig ebuild, it should fall under the same rules as any other config file.
Comment 4 Charlton Harrison 2003-09-03 08:20:00 UTC
In /etc/fonts/fonts.conf:
"
        DO NOT EDIT THIS FILE.
        IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
        LOCAL CHANGES BELONG IN 'local.conf'.
"

...okay,  so if I make my changes in local.conf they get overwritten.
And you say that's A-okay?

You say you can change the /etc config files if you want,  but you and
your package will come along and overwrite them.  without notice.
losing data.

nice.

...and then you ignore the bug report.

look,  the fix is simple:  create ._cfg0000_* files instead of
overwriting them (like it should do and all the other gentoo
packages do).

Please don't ignore this bug report.  Or at least _try_ to give
a better explanation because I am not the only one who is going
to lose data because of this package.
Comment 5 foser (RETIRED) gentoo-dev 2003-09-03 08:42:06 UTC
hmm as i in short said in #3, /etc/fonts/local.conf falls under the normal rules for config files in /etc . It shouldn't get overwritten. The part in the ebuild where fonts.conf is overwritten is quite clear, there is no such part for local.conf. Your argument is based on a wrong assumption.

PS. there is no need to forward the bugmail to me, i get changes to bugs.
Comment 6 Charlton Harrison 2003-09-03 12:39:42 UTC
I am assuming that /etc/fonts/local.conf gets overwritten along with fonts.conf because all 3 files in that directory get overwritten and have the same timestamp.

/etc/fonts/local.conf should definitely not be overwritten because it has presumably the sysadmin's customizations in there.  It appears though that it does get overwritten.  If I am wrong,  then this matter is resolved.

But if it is being overwritten then this is a bug.
Comment 7 foser (RETIRED) gentoo-dev 2003-09-03 15:08:44 UTC
If you had only checked this in a real situation by now, you would've known i am right and i wouldn't have to assure you for the third time that local.conf falls under normal config file handling.

Comment 8 Charlton Harrison 2003-09-03 15:18:55 UTC
Okay.
You are right.  This bug should have never been opened.  I feel like an ass.

But at least if anyone asks it's documented in a bug report now.
Comment 9 foser (RETIRED) gentoo-dev 2003-09-04 04:02:46 UTC
Well, i suppose i came off a little irritated there, i'm sorry for that. The initial question about fonts.conf is a valid one, but i think the overwriting is the best solution at giving our users the best possible default configuration right now. And the message mentioning this special case often scrolls by without being noticed, i hope future portage versions will fix that.