OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-re Date: 16-Jan-2004 12:49:10
Branch: HEAD Handle: 2004011611491000
Modified files:
openpkg-re fsllint.pl speclint.pl
Log:
lint our lint scripts and remove trailing whitespace
Summary:
Revision Changes Path
1.6 +7 -7 openpkg-re/fsllint.pl
1.58 +12 -12 openpkg-re/speclint.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-re/fsllint.pl
============================================================================
$ cvs diff -u -r1.5 -r1.6 fsllint.pl
--- openpkg-re/fsllint.pl 10 Oct 2003 18:42:38 -0000 1.5
+++ openpkg-re/fsllint.pl 16 Jan 2004 11:49:10 -0000 1.6
@@ -44,7 +44,7 @@
my $rpm = 'rpm';
my $rpm2cpio = 'rpm2cpio';
-# exception handling support
+# exception handling support
$SIG{__DIE__} = sub {
my ($err) = @_;
$err =~ s|\s+at\s+.*||s if (not $verbose);
@@ -211,7 +211,7 @@
&lint_warning($file, $done, $this, "whitespace on empty line (expected
none)");
}
else {
- &lint_warning($file, $done, $this, "trailing whitespace (expected
none)");
+ &lint_warning($file, $done, $this, "trailing whitespace (expected
none)");
}
$done .= $this;
}
@@ -376,7 +376,7 @@
}
$options = $';
$options =~ s/,//;
-
+
# detect superflous options in prefix channel
if ($options =~ m/\S+/s) {
$options =~ s/\n/\\n/;
@@ -425,14 +425,14 @@
}
$options = $';
$options =~ s/,//;
-
+
# enforce perm option in file channel
if ($options !~ m;perm=0[0-7]{3};) {
&lint_warning($file, "", "", "perm option in file channel invalid
or missing");
}
$options = $';
$options =~ s/,//;
-
+
# detect superflous options in file channel
if ($options =~ m/\S+/s) {
$options =~ s/\n/\\n/;
@@ -470,7 +470,7 @@
}
$options = $';
$options =~ s/,//;
-
+
# enforce perm option in file channel
if ($options !~ m;perm=0[0-7]{3};) {
&lint_warning($file, "", "", "perm option in file channel invalid
or missing on unseparated line");
@@ -480,7 +480,7 @@
$options =~ s/, jitter=[0-9]+//;
$options =~ s/, monitor=[0-9]+//;
$options =~ s/,//;
-
+
# detect superflous options in file channel
if ($options =~ m/\S+/s) {
$options =~ s/\n/\\n/;
@@ .
patch -p0 <<'@@ .'
Index: openpkg-re/speclint.pl
============================================================================
$ cvs diff -u -r1.57 -r1.58 speclint.pl
--- openpkg-re/speclint.pl 2 Jan 2004 08:59:47 -0000 1.57
+++ openpkg-re/speclint.pl 16 Jan 2004 11:49:10 -0000 1.58
@@ -43,7 +43,7 @@
my $tmpdir = ($ENV{TMPDIR} || $ENV{TEMPDIR} || "/tmp") . "/$progname";
my $rpm = 'rpm';
-# exception handling support
+# exception handling support
$SIG{__DIE__} = sub {
my ($err) = @_;
$err =~ s|\s+at\s+.*||s if (not $verbose);
@@ -209,7 +209,7 @@
&lint_warning($file, $done, $this, "whitespace on empty line (expected
none)");
}
else {
- &lint_warning($file, $done, $this, "trailing whitespace (expected
none)");
+ &lint_warning($file, $done, $this, "trailing whitespace (expected
none)");
}
$done .= $this;
}
@@ -379,7 +379,7 @@
# check for layouting
if (length($value) == 0) {
- &lint_error($file, $done, $this, "empty RPM header value");
+ &lint_error($file, $done, $this, "empty RPM header value");
}
if (length($header.":".$pad) != 14) {
&lint_warning($file, $done, $this, "invalid RPM header name/value
padding (expected value at column 15)");
@@ -423,7 +423,7 @@
foreach my $header (@headers) {
my ($type, $name, $regex) = split(/:/, $header, 3);
if ($type eq 'm') {
- if ($file =~ m|openpkg\.spec$| and
+ if ($file =~ m|openpkg\.spec$| and
($name eq "BuildPreReq" or $name eq "PreReq")) {
# the bootstrap package is an obvious exception
next;
@@ -509,7 +509,7 @@
$regex =~ s|\s+||sg;
if ($sections !~ m/^$regex$/s) {
$regex =~ s|,| |sg;
- &lint_error($file, undef, undef, "invalid RPM section order (expected
\"$regex\")");
+ &lint_error($file, undef, undef, "invalid RPM section order (expected
\"$regex\")");
}
}
@@ -710,7 +710,7 @@
# join flags with their arguments
for (my $i = 2; $i <= $#cmd; $i++) {
if ($cmd[$i] eq '-m') {
- splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
+ splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
}
}
# check paths
@@ -725,14 +725,14 @@
# join flags with their arguments
for (my $i = 2; $i <= $#cmd; $i++) {
if ($cmd[$i] =~ m/-(e|m|o|g)$/) {
- splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
+ splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
}
elsif ($cmd[$i] eq '%{SOURCE') {
- splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
+ splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
}
elsif ($cmd[$i] eq '%{l_value') {
while ($i < $#cmd and $cmd[$i+1] !~ m|\}$|s) {
- splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
+ splice(@cmd, $i, 2, $cmd[$i].$cmd[$i+1]);
}
splice(@cmd, $i, 2);
$i--;
@@ -881,7 +881,7 @@
return ($done, $todo);
}
if ($todo eq '') {
- &lint_warning($file, $outer_done, $outer_this,
+ &lint_warning($file, $outer_done, $outer_this,
"unable to correctly parse case/esac constructs in
shell-script" .
" (sub-shell parenthesis check skipped)");
}
@@ -986,7 +986,7 @@
sub check_sources {
my ($file, $spec) = @_;
- ##
+ ##
## PREPARATION
##
@@ -1236,7 +1236,7 @@
foreach my $src (%{$S}) {
my $s = $S->{$src};
next if (not $s->{-refhdr});
- if ( $s->{-url} eq '' and $s->{-type} eq 'patch'
+ if ( $s->{-url} eq '' and $s->{-type} eq 'patch'
and $s->{-file} !~ m|^${name}\.patch(\.[^./]+)?$|) {
&lint_warning($file, undef, undef, "non-canonical patch filename
\"$s->{-file}\"" .
" (expected to match \"${name}\\.patch(\\.[^./]+)?\$\")");
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]