[Debian GNUstep maintainers] Bug#593898: gnustep-back-common: Fails to upgrade in postinst script
Axel Beckert
abe at debian.org
Mon Aug 23 22:41:43 UTC 2010
Hi Yavor,
Yavor Doganov wrote:
> > The obvious solution is to run `mknfonts' in a loop, passing it one
> > font as argument at a time.
>
> Unfortunately this approach leads to the generation of incomplete
> nfont bundles for fonts with multiple variants, and apps abort with
> NSException if the font cannot be found (100% guaranteed for DejaVu,
> for example).
>
> This happens because mknfonts processes one font file at a time, so
> DejaVuSans.nfont/FontInfo.plist ends up with one key instead of 9.
So using xargs wouldn't help either. Hmmm.
> Right now I have no idea how to solve this, I'm afraid...
>
> It's not possible to group arguments by family, because there would be
> still some overwriting going on due to families like "DejaVu
> Sans,DejaVu Sans Condensed".
Well, IMHO this is a bug in mknfonts or one of the libraries linked
into it, because it definitely must not segfault on too many arguments
on the command-line.
I'd expect that there is a way to safely determine the amount of
possible commandline arguments and at least exit with an error message
instead of segfaulting. This would not fix the resulting problem with
too many fonts, but would fix the segfault.
Is there some way to "shift" the array of command line arguments as in
/bin/sh where you IIRC have to use "shift" to be able to access
parameters behind the 9th parameter (i.e. the non-existing "$10" after
"$9")? If so you may be able to "shift" away every already processed
font before some counter reaches this limit.
Regards, Axel
--
,''`. | Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
`- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
More information about the pkg-GNUstep-maintainers
mailing list