/[smeserver]/builds_bin/checkrpms
ViewVC logotype

Diff of /builds_bin/checkrpms

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.5 by slords, Tue Jan 16 18:18:19 2007 UTC Revision 1.6 by slords, Wed Jan 17 14:50:10 2007 UTC
# Line 4  use strict; Line 4  use strict;
4  use warnings;  use warnings;
5  use RPM2;  use RPM2;
6  use Data::Dumper;  use Data::Dumper;
7    use Getopt::Std;
8    
9    my %opts;
10    getopts( "s:", \%opts );
11    my $src = $opts{s} || '/builds/RPMS';
12    
13  my $rpm_flags =  RPM2->vsf_nodsa;  my $rpm_flags =  RPM2->vsf_nodsa;
 my $build_dir  = "/builds/RPMS";  
14  my @repositories = qw(  my @repositories = qw(
15          /mirrors/centos/4/fasttrack/i386/RPMS/          /mirrors/centos/4/fasttrack/i386/RPMS/
16          /mirrors/centos/4/updates/i386/RPMS/          /mirrors/centos/4/updates/i386/RPMS/
# Line 23  my @repositories = qw( Line 27  my @repositories = qw(
27          /builds/rpms/RPMS/noarch/          /builds/rpms/RPMS/noarch/
28          );          );
29    
30  opendir RPMS, $build_dir or die "Couldn't opendir $build_dir";  opendir RPMS, $src or die "Couldn't opendir $src";
31  my %rpms = map { my $x = RPM2->open_package("$build_dir/$_", $rpm_flags); $x->tag('NAME') => $x; } grep { /\.rpm$/ } readdir RPMS;  my %rpms = map { my $x = RPM2->open_package("$src/$_", $rpm_flags); $x->tag('NAME') => $x; } grep { /\.rpm$/ } readdir RPMS;
32  closedir RPMS;  closedir RPMS;
33    
34  my %repos;  my %repos;
# Line 78  foreach my $rpm ( sort keys %rpms ) Line 82  foreach my $rpm ( sort keys %rpms )
82                  my $filename = $rpms{$rpm}->filename;                  my $filename = $rpms{$rpm}->filename;
83                  $filename =~ s@^.*/(.*)@$1@;                  $filename =~ s@^.*/(.*)@$1@;
84                  print " " . ($header eq $rpms{$rpm} ? "** " : "-- ") . $header->as_nvre . " ($path)\n";                  print " " . ($header eq $rpms{$rpm} ? "** " : "-- ") . $header->as_nvre . " ($path)\n";
85                  #print "     - rm $build_dir/$filename; cp ". $header->filename . " $build_dir\n";                  #print "     - rm $src/$filename; cp ". $header->filename . " $src\n";
86              }              }
87          }          }
88      }      }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed