OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   17-Jul-2003 17:43:14
  Branch: HEAD                             Handle: 2003071716431300

  Modified files:
    openpkg-re              speclint.pl

  Log:
    add shtool install checks; PR#204

  Summary:
    Revision    Changes     Path
    1.33        +25 -0      openpkg-re/speclint.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-re/speclint.pl
  ============================================================================
  $ cvs diff -u -r1.32 -r1.33 speclint.pl
  --- openpkg-re/speclint.pl    17 Jul 2003 12:42:55 -0000      1.32
  +++ openpkg-re/speclint.pl    17 Jul 2003 15:43:13 -0000      1.33
  @@ -816,5 +816,30 @@
       #                  "(expected maximum of 79 characters)");
       #    $done .= $this;
       #}
  +
  +    #   check for "shtool install" with -e on same line
  +    my $done = ''; my $this = ''; my $todo = $spec;
  +    while ($todo =~ m/%{l_shtool} install[^\n]*-e/s) {
  +        $done .= $`; $this = $&; $todo = $';
  +        &lint_warning($file, $done, $this, "found -e option of \"shtool install\" 
on same line (expected separate lines)");
  +        $done .= $this;
  +    }
  +
  +    #   check for "shtool install" with multiple -e on same line
  +    my $done = ''; my $this = ''; my $todo = $spec;
  +    #hile ($todo =~ m/%{l_shtool} install[^\n]+\\\n([^\n]*-e[^\n]*-e[^\n]*\\\n)+/s) 
{
  +    while ($todo =~ m/%{l_shtool} 
install[^\n]+\\\n([^\n]*?-e[^\n]*?-e[^\n]*\\\n)+/s) {
  +        $done .= $`; $this = $&; $todo = $';
  +        &lint_warning($file, $done, $this, "found multiple -e options of \"shtool 
install\" on same line (expected separate lines)");
  +        $done .= $this;
  +    }
  +
  +    #   check for deprecated use of "shtool install -e @l_...@ %{l_...}"
  +    my $done = ''; my $this = ''; my $todo = $spec;
  +    while ($todo =~ m/%{l_shtool} [EMAIL PROTECTED](prefix|[mrn](usr|grp))/s) {
  +        $done .= $`; $this = $&; $todo = $';
  +        &lint_warning($file, $done, $this, "deprecated usage of \"shtool install -e 
[EMAIL PROTECTED]@\" (expected use of %{l_value ...})");
  +        $done .= $this;
  +    }
   }
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to