Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201834 - font.eclass sucks at paths containing spaces
Summary: font.eclass sucks at paths containing spaces
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-10 10:04 UTC by Peter Volkov (RETIRED)
Modified: 2008-01-08 22:34 UTC (History)
0 users

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


Attachments
font.eclass.diff (fonts.diff,427 bytes, patch)
2007-12-10 10:09 UTC, Peter Volkov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2007-12-10 10:04:53 UTC
If you define more than one file inside FONT_CONF eclass failes to handle this because $FONT_CONF is quoted inside for cycle (eclass/font.eclass:67) and all space separated files are passed further as one file.
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2007-12-10 10:09:12 UTC
Created attachment 138151 [details, diff]
font.eclass.diff

This is how I think we should fix the problem currently.

The problem that still remains how to work with space separated paths inside $FONT_CONF? 

This bug blocks me from bumping dejavu-2.22 fonts.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2007-12-10 23:58:37 UTC
applied. (sorry bout that)

i'll leave this open until i have a way to deal with paths containing spaces.  does that affect dejavu?
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2007-12-11 07:53:10 UTC
Thank you, Ryan. Now I can bump dejavu.

Speaking about spaces in the path... font.eclass is not the only eclass which suffer from this problem. kernel-2.eclass have this problem too as they also have:

for i in ${UNIPATCH_LIST}; do
    ....

So that was just a question and currently I do not know solution. Well it's time to ask in -dev for solution.
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2007-12-13 09:20:49 UTC
Ryan, I know, you read discussion, but I'm documenting result here:

====================================================
Currently I see that the best approach is arrays. They provide required functionality, clear syntax and easy upgrade path. Speaking about the latter it is:

1. Modify eclass to use arrays:

for conffile in ${FONT_CONF[@]}; do
	...
done

2. Modify ebuilds to use arrays.

-FONT_CONF="path1 path2"
+FONT_CONF=( "path1" "path2" )

3. Modify eclass, so that it works with path containing spaces inside:

-for conffile in ${FONT_CONF[@]}; do
+for conffile in "${FONT_CONF[@]}"; do
====================================================

If that's Ok for you, I can do this transition for fonts.eclass.
Comment 5 Ryan Hill (RETIRED) gentoo-dev 2007-12-14 04:17:35 UTC
Okay.  Thanks.
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2008-01-08 17:58:56 UTC
Well. Transition made. Fixed.

Of course if there are any regressions assign on me and I'll fix them ASAP.
Comment 7 Ryan Hill (RETIRED) gentoo-dev 2008-01-08 22:34:16 UTC
Thanks again! :)