Bug#491578: manpage wrapping warnings should be ignored if the line contains an URL
Package: lintian
Version: 1.24.2
Severity: normal
Tags: patch
Attached is a patch that makes checks/manpages not issue
manpage-has-errors-from-man if the line in question contains an URL.
We have a lot of packages that expose this warning and the current
practice is to add an override. However, I think it is a bug in lintian
and overriding it is not to be done.
Rationale:
First, breaking URLs is not that good. It does help users with narrow
terminals, but they have also the option of scrolling right and see the
whole URL and copy&paste it in parts (same as if it is broken to more
lines lines).
Yes, this would require that PAGER is set to less or another
scroll-capable pager, but given that less is Priority:standard, having
it installed and set as the default pager (less is preferred over other
'pager' alternatives) is how most systems are. The cases when PAGER is
set to 'more' are (I guess) in stripped-down systems that probably don't
have any manpages on them anyway.
We also considered the following alternatives to the patch:
* make pod2man not disable hyphenation.
There is a comment in the generated manpage saying that hyphenation is
disabled because it often doesn't work well with technical texts. This
is a bit questionable, I guess, and if you think this is a mistake,
please reassign the bug to 'perl'.
The rationale for not recommending such solution is that turning on
hyphenation (perhaps only for links, if such granularity is possible)
would benefit only narrow-terminal users in such a way that is equal
to scrolling (i.e. what they have now).
* patch upstream sources, hand-wrapping long URLs.
I feel discomfort sending such patches upstream. Additionally for not
improving much the situation for narrow-terminal users, it would be a
regression for users with wide terminals that now have to do two
copy&pastes regardless of the fact that their terminal is capable of
showing the complete URL unwrapped.
Thanks for considering,
dam
Debian Perl Group
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.25-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lintian depends on:
ii binutils 2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii diffstat 1.45-2 produces graph of changes introduc
ii dpkg-dev 1.14.20 Debian package development tools
ii file 4.25-1 Determines file type using "magic"
ii gettext 0.17-3 GNU Internationalization utilities
ii intltool-debian 0.35.0+20060710.1 Help i18n of RFC822 compliant conf
ii libdigest-sha-perl 5.47-1 Perl extension for SHA-1/224/256/3
ii libparse-debianchan 1.1.1-2 parse Debian changelogs and output
ii libtimedate-perl 1.1600-9 Time and date functions for Perl
ii liburi-perl 1.35.dfsg.1-1 Manipulates and accesses URI strin
ii man-db 2.5.2-2 on-line manual pager
ii perl [libdigest-sha 5.10.0-11.1 Larry Wall's Practical Extraction
lintian recommends no packages.
Versions of packages lintian suggests:
pn binutils-multiarch <none> (no description available)
ii libtext-template-perl 1.44-1.2 Text::Template perl module
ii man-db 2.5.2-2 on-line manual pager
-- no debconf information
diff --git a/checks/manpages b/checks/manpages
index ce0d4d0..93772fb 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -304,6 +304,9 @@ while (<IN>) {
next if /warning \[.*\]: cannot adjust line/;
next if /warning \[.*\]: can\'t break line/;
}
+ # ignore wrapping failures if they contain URLs
+ next if /:(\d+): warning \[.*\]: can\'t break line/
+ and $manfile[$1-1] =~ m,<(?:http|ftp)://.+>,i;
# ignore charset issues with old versions of man for all man pages
# since we can't know, with old versions, whether that was just a
# Unicode issue
Reply to: