Summary: | use.local.desc is b0rkened wrt whitespace | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fabian Groffen <grobian> |
Component: | [OLD] Unspecified | Assignee: | Alec Warner (RETIRED) <antarus> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | cardoe, grobian, ulm |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch for use_desc_gen.diff |
Description
Fabian Groffen
2008-08-03 16:04:17 UTC
Created attachment 162200 [details, diff]
Patch for use_desc_gen.diff
Attached patch will fix the line break problem by converting any amount of whitespace to a single blank.
There is another whitespace problem with <pkg> tags, see for example app-text/sword: <use> <flag name='icu'>Enable <pkg>dev-libs/icu</pkg> support for sword</flag> <flag name='lucene'>Enable lucene support for faster searching (<pkg>dev-cpp/clucene</pkg>)</flag> </use> This is converted to the following in use.local.desc: app-text/sword:icu - Enable dev-libs/icusupport for sword app-text/sword:lucene - Enable lucene support for faster searching ( dev-cpp/clucene) The first description misses a blank after the pkg name, while for the second one a spurious blank is inserted before. There was a use case for adding spaces before <pkg> declarations; let me see if I wrote down what it was. -Alec Fixed in CVS..I think ;) in today's diff: + x11-libs/wxGTK:gnome - Use gnome-base/libgnomeprintui for printing tasks. + x11-libs/wxGTK:gstreamer - Enable the wxMediaCtrl class for playing audio and video through gstreamer. + x11-libs/wxGTK:sdl - Use Simple Directmedia Layer (media-libs/libsdl) for audio. (note: two spaces after the hyphen) I think it's do to the 3 different types of spaces in the actual metadata.xml file. There's a newline, some tabs, and some spaces before the actual data. since it's computer generated code, I thought doing a .strip() would just give some consistency in the use.local.desc file... (In reply to comment #7) > since it's computer generated code, I thought doing a .strip() would just give > some consistency in the use.local.desc file... > If you strip leading spaces you end up with <pkg> tags that run into other items: <pkg1>, <pkg2>, <pkg> becomes pkg1,pkg2,pkg3 It would be easier to just stick to spaces in the metadata.xml (2 spaces? 4? tabs?) -Alec Gentoo uses tabs everywhere, I never got why people have to use spaces with xml. It would be a lot more consistent if metadata.xml just used tabs (and proper indenting!!!) |