diff options
| -rw-r--r-- | NEWS | 6 | ||||
| -rw-r--r-- | TODO | 2 | ||||
| -rwxr-xr-x | sbolint | 33 |
3 files changed, 39 insertions, 2 deletions
@@ -12,6 +12,12 @@ sbolint: an actual error, at least for now. - doinst.sh must not refer to $PKG (it won't be set when it runs). - SlackBuild scripts must not call 'npm audit fix'. +- .info file variables that have multiple values (DOWNLOAD, MD5SUM, + DOWNLOAD_x86_64, and MD5SUM_x86_64) *must* be broken into + multiple lines with "\" at the end of all except the last. +- .info file variables PRGNAM, VERSION, HOMEPAGE, REQUIRES, MAINTAINER, + and EMAIL must appear on one line, not broken up with \ at the end + of the line like DOWNLOAD and MD5SUM allow. sbopkglint: - Package which bundle their own glibc in /opt no longer trigger @@ -8,7 +8,7 @@ lrwxrwxrwx 1 root root 99 May 23 18:14 ./usr/lib64/pidgin/libgowhatsapp.so -> /h ...if the link target is /home/* or maybe if it's anything but /usr/* TODO: sbopkglint fails to detect install-info, see pound @ 730a4ab1f9ee3162be2c6daf910c8b064e9169cb -TODO: sbolint should check for invalid characters in REQUIRES. someone +DONE: sbolint should check for invalid characters in REQUIRES. someone had an issue with a tab character, which looked fine when editing or viewing the file... but the submission form choked on it. TODO: sbopkglint: error on 0.0.0.dist-info @@ -303,6 +303,20 @@ request (see the B<-u> option). =item - +For DOWNLOAD, DOWNLOAD_x86_64, MD5SUM, and MD5SUM_x86_64, if there are +multiple values (URLs or md5sums), they must appear on separate lines, +with B<\> at the end of each line but the last. + +=item - + +For PRGNAM, VERSION, HOMEPAGE, REQUIRES, MAINTAINER, and EMAIL, +breaking up the value across multiple lines with B<\> is not +allowed. The only one of these that accepts multiple values is +REQUIRES, anyway. Various scripts have been written that parse .info +files and would break if REQUIRES were split. + +=item - + If there is a doinst.sh script: =over 4 @@ -1107,7 +1121,21 @@ sub check_info { my $fixable = 0; - # parse and bitch about bad syntax... + # pass 1: just check for continuations. keys that have multiple + # values *must* be broken up with \ (not all on one line with spaces). + for(@lines) { + $lineno++; + next unless /^(DOWNLOAD(?:_x86_64)?|MD5SUM(?:_x86_64)?)/; + my $k = $1; + if(/\s\s/) { + log_warning("$file:$lineno: $k has sequences of multiple spaces; collapse them into one"); + } elsif (/\s[^\\]/) { + log_error("$file:$lineno: $k has multiple values and must be split into multiple lines with \\"); + } + } + + # pass 2: parse and bitch about bad syntax... + $lineno = 0; for(@lines) { $lineno++; if($continuation) { @@ -1117,6 +1145,9 @@ sub check_info { } if(s/\s*\\$//) { + if(/^(PRGNAM|VERSION|HOMEPAGE|REQUIRES|MAINTAINER|EMAIL)/) { + log_error("$file:$lineno: $1 may not be broken up into multiple lines with \\"); + } $continuation = $_; next; } |
