[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#302138: incorrect Description line wrapping with bullet lists

Package: linda
Version: 0.3.10
Severity: wishlist

ObListCC: search for 'mass bug' below.

Lots of packages have a Description field that includes a bullet list.
There is no good way to do these, unfortunately, but lots of wrong
ways.  In particular, you'll cause incorrect line wrapping in dselect
or aptitude if you don't indent each bullet by at least one space.

Take for example db4.1-util 4.1.25-18:

| This package provides different tools for manipulating databases
| in the Berkeley v4.1 database format, and includes:
| - db4.1_archive: write the pathnames of the log files no longer in use.
| - db4.1_checkpoint: daemon process to monitor the database log and checkpoint
|   it periodically.
| - db4.1_deadlock: traverse the database environment lock region and abort
|   lock requests when a deadlock is detected.

The first 4 lines will wrap freely, which is wrong, and the "it
periodically" won't wrap back to the previous line, which is also

The best way to do bullet points is to indent the line with the bullet
character on it.  Another way is to separate bullet points with " ."
lines, instead of indenting them.  Either way you must _not_ indent any
followup lines.  Neither form renders ideally well, but at least they
word-wrap correctly.

I'd like to file a mass bug for these, but it's on the order of 583
binary packages in 430 source packages, so I obviously want to get some
feedback first.

Common bullet characters are "-", "*" and "o".  Linda could flag a
warning if a description includes the regex "^ [-*o] " which does not
immediately follow "^ \.$".  That's one problem case.  The other would
be a line "^ *[-*o] " followed immediately by "^  " but not another
"^ *[-*o] ".  Please find attached a quick perl script I cooked up for
piping a Packages file into, as proof of concept.
#!/usr/bin/perl -nl

	print "# issue_1: line starting with bullet wraps to previous line";
	print "# issue_2: line following bullet doesn't wrap with it";
	print "#";
	print "# SRC_PKG BIN_PKG - problem";
	sub whine {
		my ($n) = @_;
		if (!$inf[$n]->{$p}++) {
			print "$s $p - issue_$n"
if (m/^Package: (.*)/) { $s = $p = $1 }
if (m/^Source: (.*)/) { $s = $1 }

if (!$dot and m/^ [-*o] /) { whine(1) }
if ($bul and m/^  / and !m/^ *[-*o] /) { whine(2) }

if ($_ eq ' .') { $dot = 1 } else { $dot = 0 }
if (m/^ *[-*o] /) { $bul = 1 } else { $bul = 0 }

Attachment: signature.asc
Description: Digital signature

Reply to: