Description of problem:
If a %description entry in an RPM file uses its own layout then yum will mangle the description rendering it unreadable. yum assumes descriptions are paragraphs of text that can be reflowed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. rpm -qi translate-toolkit
2. yum info translate-toolkit
3. compare respective description sections
This will get garbled so I'll add an attachment later.
rpm -qi translate toolkit # provides layout as specified in the .spec file
yum info translate-toolkit # reflows text to make it unreadable
yum should respect the %description section so that lists and layout can be preserved.
For yum info the solution could be as simple as following the representation found in rpm i.e.:
Blah blah blah
Instead of the current:
: More blah
There may be a need for such reflowing in applications that want to use the data e.g. GUI package installers such as those in PackageKit. But in this case it is probably better to either have some basic understanding of layout used or only reflow paragraphs that meet certain criteria. E.g.
* Is a list
* With items that can be reflowed
If a paragraph does not start in column 1 it shouldn't be reflowed.
Created attachment 328260 [details]
Current output from rpm and yum and proposed changes
Show current output from rpm and yum for the translate-toolkit package.
Includes two examples of the suggested layout.
The 3.2.20-8 in rawhide, upstream and what will be in 3.2.21 gives the following output:
Description: A set of tools for managing translation and software localization
: via Gettext PO or XLIFF format files.
: * Convertors: convert from various formats to PO or XLIFF
: * Formats:
: * Core localization formats - XLIFF and Gettext PO
: * Other localization formats - TMX, TBX, Qt Linguist (.ts),
: Java .properties, Wordfast TM
: * Compiled formats: Gettext MO, Qt .qm
: * Other formats - text, HTML, CSV, INI, wiki (MediaWiki,
: DokuWiki), iCal
: * Specialised - OpenOffice.org GSI/SDF, PHP,
: Mozilla (.dtd, .properties, etc)
: * Tools: count, search, debug, segment and pretranslate
: localization files. Extract terminology from localization
: * Checkers: validate translations with over 45 checks
Note that there are still a very few descriptions which we still can't flow properly (setools-devel is an example). So there is still some motivation for saying "just treat descriptions as an unflowable block of text", but I think this is very bad for the users.
And the code in yum currently displays exactly what is in the description assuming the terminal is big enough.
Saying that, PK is currently trying to completely redefine the description as some kind of Wiki text and can be changed at will ... so this may well change again, due to that succeeding, or due to the backlash from it.
James -> thanks for the feedback and the new rendering is a relief.
I agree that for users this is better and would rather suggest cleaning up the few broken %descriptions that can't be reflowed.
For anyone reading this later:
The markup used by PK is called Markdown, see: http://www.packagekit.org/pk-faq.html#markup
They talk as if this actually works, but the current Fedora won't accept the markdown that I specified in my package.