AOSC-Archive / autobuild3

AOSC OS package maintenance toolkit (version 3)
https://aosc.io
GNU General Public License v2.0
24 stars 17 forks source link

PM: Need uniform long-description data structure #56

Open Artoria2e5 opened 9 years ago

Artoria2e5 commented 9 years ago

Dpkg: https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description

Description: <single line synopsis>
<extended description over several lines>

The lines in the extended description can have these formats:

  • Those starting with a single space are part of a paragraph. Successive lines of this form will be word-wrapped when displayed. The leading space will usually be stripped off. The line must contain at least one non-whitespace character.
  • Those starting with two or more spaces. These will be displayed verbatim. If the display cannot be panned horizontally, the displaying program will line wrap them "hard" (i.e., without taking account of word breaks). If it can they will be allowed to trail off to the right. None, one or two initial spaces may be deleted, but the number of spaces deleted from each line will be the same (so that you can have indenting work correctly, for example). The line must contain at least one non-whitespace character.
  • Those containing a single space followed by a single full stop character. These are rendered as blank lines. This is the only way to get a blank line[39].
  • Those containing a space, a full stop and some more characters. These are for future expansion. Do not use them.

RPM:

http://rpm5.org/docs/api/specfile.html The description is free form text, but there are two things to note. The first regards reformatting. Lines that begin with white space are considered "pre-formatted" and will be left alone. Adjacent lines without leading whitespace are considered a single paragraph and may be subject to formatting by glint or another RPM tool.

http://www.rpm.org/max-rpm/s1-rpm-inside-tags.html If a line starts with a space, that line will be displayed verbatim by RPM. Lines that do not start with a space are assumed to be part of a paragraph and will be formatted by RPM. It's even possible to mix and match formatted and unformatted lines. Here are some examples:

It seems that we will be interested in expanding $PKGDES to an array of paragraphs.

MingcongBai commented 9 years ago

rpm5 is not the same as rpm. Just keep in mind.