From owner-freebsd-gnome@FreeBSD.ORG Mon Feb 6 04:03:58 2006 Return-Path: X-Original-To: gnome@freebsd.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4B9116A423; Mon, 6 Feb 2006 04:03:58 +0000 (GMT) (envelope-from dejan.lesjak@ijs.si) Received: from mail.ijs.si (mail.ijs.si [193.2.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E5B243D6A; Mon, 6 Feb 2006 04:03:54 +0000 (GMT) (envelope-from dejan.lesjak@ijs.si) Received: from localhost (mail4.ijs.si [193.2.4.66]) by patsy.ijs.si (Postfix) with ESMTP id 91B0E17B92C; Mon, 6 Feb 2006 05:03:53 +0100 (CET) X-Virus-Scanned: amavisd-new at ijs.si Received: from mail.ijs.si ([193.2.4.66]) by localhost (patsy.ijs.si [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vj0tf1vhEx7y; Mon, 6 Feb 2006 05:03:50 +0100 (CET) Received: from radagast.ijs.si (radagast.ijs.si [193.2.4.168]) by patsy.ijs.si (Postfix) with ESMTP id 5E2A017B8C8; Mon, 6 Feb 2006 05:03:50 +0100 (CET) Received: from localhost.ijs.si (localhost.ijs.si [127.0.0.1]) by radagast.ijs.si (Postfix) with ESMTP id 0343B1702F; Mon, 6 Feb 2006 05:03:49 +0100 (CET) From: Dejan Lesjak To: Kris Kennaway Date: Mon, 6 Feb 2006 05:03:46 +0100 User-Agent: KMail/1.9.1 References: <20060202161851.GA29539@xor.obsecurity.org> <200602022103.02801.dejan.lesjak@ijs.si> <20060202201032.GB134@xor.obsecurity.org> In-Reply-To: <20060202201032.GB134@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602060503.48692.dejan.lesjak@ijs.si> Cc: gnome@freebsd.org, freebsd-x11@freebsd.org Subject: Re: [ports-i386@FreeBSD.org: gtk-2.8.11 failed on i386 6] X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Feb 2006 04:03:59 -0000 On Thursday 02 February 2006 21:10, Kris Kennaway wrote: > On Thu, Feb 02, 2006 at 09:03:00PM +0100, Dejan Lesjak wrote: > > On Thursday 02 February 2006 20:35, Kris Kennaway wrote: > > > On Thu, Feb 02, 2006 at 02:25:21PM -0500, Joe Marcus Clarke wrote: > > > > Dejan Lesjak wrote: > > > > > On Thursday 02 February 2006 18:35, Joe Marcus Clarke wrote: > > > > >> On Thu, 2006-02-02 at 17:43 +0100, Dejan Lesjak wrote: > > > > >>> [fontconfig maintainers cced] > > > > >>> > > > > >>> On Thursday 02 February 2006 17:18, Kris Kennaway wrote: > > > > >>>> This failure is caused by the following files left in the > > > > >>>> directory after xorg-font-encodings has been removed: > > > > >>>> > > > > >>>> -rw-r--r-- 1 root wheel 17 Feb 1 19:53 > > > > >>>> /usr/X11R6/lib/X11/fonts/encodings/fonts.cache-1 -rw-r--r-- 1 > > > > >>>> root wheel 0 Feb 1 19:53 > > > > >>>> /usr/X11R6/lib/X11/fonts/encodings/large/fonts.cache-1 > > > > >>>> > > > > >>>> These are then removed by fontconfig, but nothing cleans up the > > > > >>>> directories. What should be doing that? > > > > >>> > > > > >>> Interesting question. fontencodings don't create fonts.cache-1, > > > > >>> but it will probably be easier and less messy if they remove them > > > > >>> so they can also remove directories. Can it be assumed that > > > > >>> fontconfig is present at the time fontencodings are uninstalled? > > > > >> > > > > >> Not necessarily. fontconfig is only a build dependency of > > > > >> xorg-font-encodings. Therefore, you could remove fontconfig, and > > > > >> keep encodings around. > > > > > > > > > > Oh. The thing is that it's easy to check if > > > > > encodings/large/fonts.cache-1 is empty and remove it in that case. > > > > > On the other hand encodings/fonts.cache-1 contains the line > > > > > pointing to "large" subdir so I was thinking of first removing > > > > > encodings/large/fonts.cache-1 if it is empty, then encodings/large > > > > > directory, then running fc-cache on encodings and remove > > > > > encodings/fonts.cache-1 if it's empty. If fc-config is not present > > > > > some parsing will be necessary... > > > > > Is there a way fc-cache could ignore encodings subdirectory? > > > > > > > > > >> The strange thing is that fontconfig removes all > > > > >> fonts.cache-1 files under /usr/X11R6/lib/X11/fonts upon > > > > >> deinstallation. > > > > > > > > > > Perhaps generating and removing cache files should be made > > > > > responsibility of fonts ports? IIRC quite some of them handle it > > > > > already. That could also avoid running fc-cache with default > > > > > settings thus avoiding fonts.cache-1 files under encodings. > > > > > > > > This is doable. I could remove the cache generation and cleaning > > > > code from fontconfig once all font ports have been updated to run > > > > fc-cache themselves. This would require all font ports to depend on > > > > fontconfig, though. > > > > > > Wouldn't it be less work to just make fontconfig @dirrmtry the > > > directories it removes cache files from? > > > > That would be somewhat like > > @unexec find %%X11BASE%%/lib/X11/fonts/ -type d -empty -delete > > > > > That way you also don't have > > > to worry about fontcache never operating on non-port font directories > > > the user may have created. > > > > It's not that trivial: unless explicitly specifying directory to it, > > fc-cache will run on directories specified in > > ${X11BASE}/etc/fonts/fonts.conf (and any included file). Among others > > this means all subdirectories of > > ${X11BASE}/lib/X11/fonts. If a user would make a directory > > ${X11BASE}/lib/X11/fonts/mumble, fc-cache will happily populate it with > > empty fonts.cache-1 file. Passing responsibility to run fc-cache to fonts > > ports would avoid that (at least as far as ports go; user can still run > > fc-cache without directory argument of course). > > OK, whatever is easiest :) Easiest would be to just skip font cache generation :-) But here's what I tried and is in xorg-fonts-encodings-6.9.0_1: First remove encodings/large/fonts.cache-1 file, then (for cases where someone/something installed actual fonts there) regenerate it if fc-cache is present, then remove it if it is empty. Repeat this for encodings/fonts.cache-1. I've added similar fun to xorg-fonts-*. This should result in not leaving stale/erroneous cache files around while still leaving correct cache files for fonts that were left in those directories (i.e. for fonts that were not installed by these ports) if fontcache is installed. I think this should gracefully handle all cases and it turned out less complicated than I thought. Dejan