OpenPKG CVS Repository
  http://www.openpkg.org/cvsweb/cvsweb.cgi
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   10-Jul-2002 15:56:29
  Branch: HEAD                             Handle: 2002071014562900

  Modified files:
    openpkg-re              buildrdf.pl

  Log:
    - show processing of each RPM when running verbose
    - be very pedantic when checking filenames against release engineering policies
    - when skipping RPMs for whatever reason print a WARNING to stderr and continue

  Summary:
    Revision    Changes     Path
    1.17        +14 -8      openpkg-re/buildrdf.pl
  ____________________________________________________________________________

  Index: openpkg-re/buildrdf.pl
  ============================================================
  $ cvs diff -u -r1.16 -r1.17 buildrdf.pl
  --- openpkg-re/buildrdf.pl    10 Jul 2002 10:06:42 -0000      1.16
  +++ openpkg-re/buildrdf.pl    10 Jul 2002 13:56:29 -0000      1.17
  @@ -18,8 +18,8 @@
   # - program skips inaccessible folders and prints a warning
   # - modifying filesystem during operation causes unpredictable results
   # 
  -# $Id: buildrdf.pl,v 1.16 2002/07/10 10:06:42 thl Exp $
  -# $Revision: 1.16 $
  +# $Id: buildrdf.pl,v 1.17 2002/07/10 13:56:29 thl Exp $
  +# $Revision: 1.17 $
   # 
   # (C)20011022 Cable & Wireless Deutschland GmbH
   # Application Services, Development Team
  @@ -146,9 +146,15 @@
           closedir FOLDER;
           foreach $entry (@entries) {
               $i=$prefix.$folder.$entry;
  -            if (-f $i and not -l $i and ($entry =~ 
m|^[^-]+-[^-]+-[^-]+(\.src)?\.rpm$|)) {
  -                rpm2rdf($prefixname, $prefix, $folder, $entry);
  -            }    
  +            if (-f $i and not -l $i and $entry =~ m/^.+-[^-]+-[^-]+\..+\.rpm$/ ) {
  +                print STDERR " processing $i\n" if ($verbose);
  +                if ($entry =~ 
m/^.+-[^-]+-([1-9]+[0-9]*\.[0-9]+\.[0-9]+|([1-9]+[0-9]*\.)?20[0-9]{2}(0[1-9]|1[012])([0][1-9]|[12][0-9]|[3][01]))\.(src|[^-]+-[^-]+-[^-]+)\.rpm$/)
 {
  +                    rpm2rdf($prefixname, $prefix, $folder, $entry);
  +                }
  +                else {
  +                    print STDERR "$0: WARNING: $rpm skipping illegal filename 
$entry\n"; #report but ignore
  +                }
  +            }
               if (-d $i and not -l $i) {
                   scanfolder($prefixname, $prefix, $folder.$entry, $rdffile);
               }    
  @@ -220,9 +226,9 @@
       $q .= "[M-Provides %{PROVIDENAME} 
%|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags}%{PROVIDEVERSION}}:{}|\n]" if !$s;
   
       #make the query
  -    $v = `$rpm -qp --qf "$q" $prefix$folder$file`;
  +    $v = `$rpm -qp --qf "$q" $prefix$folder$file 2>/dev/null`;
       if ( $? != 0 ) {
  -        print STDERR "$0: ERROR: $rpm cannot query $prefix$folder$file, error 
$?\n"; #report but ignore errors
  +        print STDERR "$0: WARNING: $rpm cannot query $prefix$folder$file, error 
$?\n"; #report but ignore
       }
   
       #   pull out entrails from a source package
  @@ -275,7 +281,7 @@
   
       my $rc = `cd $tmpdir && ${rpm}2cpio <$rpmsource 2>/dev/null | cpio -i 
'$name.spec' 2>/dev/null`;
       if ( $? != 0 ) {
  -        print STDERR "$0: ERROR: $rpm cannot read $name.spec from  $rpmsource, 
error $?\n"; #report but ignore errors
  +        print STDERR "$0: WARNING: $rpm cannot read $name.spec from  $rpmsource, 
error $?\n"; #report but ignore
           return;
       }
       open(SPEC, "<$tmpdir/$name.spec");
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to