/[smeserver]/builds_bin/update_repos
ViewVC logotype

Diff of /builds_bin/update_repos

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

Revision 1.33 by slords, Tue Dec 11 15:35:32 2007 UTC Revision 1.35 by slords, Sun Dec 23 22:24:41 2007 UTC
# Line 49  my $repos = { 'smeos'              => { Line 49  my $repos = { 'smeos'              => {
49                'smeupdates-testing' => { prio => 16, inc => 1, ver => 1, rel => 1 },                'smeupdates-testing' => { prio => 16, inc => 1, ver => 1, rel => 1 },
50                'smeextras'          => { prio => 15, inc => 0, ver => 1, rel => 1 },                'smeextras'          => { prio => 15, inc => 0, ver => 1, rel => 1 },
51                'smeaddons'          => { prio => 14, inc => 0, ver => 1, rel => 1 },                'smeaddons'          => { prio => 14, inc => 0, ver => 1, rel => 1 },
52                'smecontribs'        => { prio => 13, inc => 0, ver => 1, rel => 2 },                'smecontribs'        => { prio => 13, inc => 0, ver => 1, rel => 1 },
53                'smetest'            => { prio => 12, inc => 0, ver => 2, rel => 2, devel => 2 },                'smetest'            => { prio => 12, inc => 0, ver => 2, rel => 2, devel => 2 },
54                'smedev'             => { prio => 11, inc => 0, ver => 2, rel => 2, devel => 1 },                'smedev'             => { prio => 11, inc => 0, ver => 2, rel => 2, devel => 1 },
55                'centos'             => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'centos'             => { prio => 10, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
# Line 97  if ( $opts{q} ) { Line 97  if ( $opts{q} ) {
97  }  }
98    
99  my $skippkg = { '7' => { 'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3', 'vim' ) },  my $skippkg = { '7' => { 'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3', 'vim' ) },
100                           'epel'          => { map { $_ => 1 } ( 'perl-Razor-Agent' ) },                           'epel'          => { map { $_ => 1 } ( 'clamav', 'perl-Razor-Agent' ) },
101                           'rpmforge'      => { map { $_ => 1 } ( 'perl-Test-Inline' ) },                           'rpmforge'      => { map { $_ => 1 } ( 'perl-Test-Inline' ) },
102                           'atrpms'        => { map { $_ => 1 } ( 'dovecot', 'trac', 'yum' ) },                           'atrpms'        => { map { $_ => 1 } ( 'dovecot', 'trac', 'yum' ) },
103                         },                         },
104                  '8' => { 'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) },                  '8' => { 'centos'        => { map { $_ => 1 } ( 'horde', 'imp-h3', 'ingo-h3', 'turba-h3' ) },
105                           'fedora'        => { map { $_ => 1 } ( 'kernel-xen' ) },                           'fedora'        => { map { $_ => 1 } ( 'kernel-xen' ) },
106                           'epel'          => { map { $_ => 1 } ( 'perl-Razor-Agent', 'smolt' ) },                           'epel'          => { map { $_ => 1 } ( 'clamav', 'perl-Razor-Agent', 'smolt' ) },
107                           'fedora-extras' => { map { $_ => 1 } ( 'dstat', 'gocr', 'horde', 'oidentd', 'perl-Test-Inline', 'perl-Razor-Agent', 'smolt' ) },                           'fedora-extras' => { map { $_ => 1 } ( 'dstat', 'gocr', 'horde', 'oidentd', 'perl-Test-Inline', 'perl-Razor-Agent', 'smolt' ) },
108                           'rpmforge'      => { map { $_ => 1 } ( 'perl-Test-Inline' ) },                           'rpmforge'      => { map { $_ => 1 } ( 'perl-Test-Inline' ) },
109                         },                         },
# Line 147  foreach my $smever ( sort { $a <=> $b } Line 147  foreach my $smever ( sort { $a <=> $b }
147      find( { wanted => sub { process_rpm($_, $smever, 'contribs'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$smever}->{'contribs'} );      find( { wanted => sub { process_rpm($_, $smever, 'contribs'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$smever}->{'contribs'} );
148    
149      foreach my $base ( sort keys %$rpms ) {      foreach my $base ( sort keys %$rpms ) {
150            next unless $rpms->{$base}->{rpms};
151          my %track = ();          my %track = ();
152          my %seen = ();          my %seen = ();
153          my %counts = ();          my %counts = ();
# Line 351  foreach my $smever ( sort { $a <=> $b } Line 352  foreach my $smever ( sort { $a <=> $b }
352                  }                  }
353                  qx(rm -f $src) if exists $pkg->{delete} && ! $opts{t};                  qx(rm -f $src) if exists $pkg->{delete} && ! $opts{t};
354              } elsif ( $pkg->{delete} ) {              } elsif ( $pkg->{delete} ) {
355                  print "delete from ", $pkg->{repo}, " (", basename($pkg->{rpm}->filename), ")\n";                  print "delete from ", $pkg->{repo}, " (", $pkg->{arch}, ", ", basename($pkg->{rpm}->filename), ")\n";
356                  qx(rm -f $src) unless $opts{t};                  qx(rm -f $src) unless $opts{t};
357                  $repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage};                  $repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage};
358              }              }
# Line 440  sub process_rpm { Line 441  sub process_rpm {
441      return if $skippkg->{$smever}->{$repo} && $skippkg->{$smever}->{$repo}->{$src};      return if $skippkg->{$smever}->{$repo} && $skippkg->{$smever}->{$repo}->{$src};
442      return if $repos->{$repo}->{base} && $nosig;      return if $repos->{$repo}->{base} && $nosig;
443      if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; }      if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; }
444        my $arch = 'unknown';
445        $arch = 'SRPMS' if $pkg->filename =~ m{[/-](SRPMS?|src|source)/};
446        $arch = 'x86_64' if $pkg->filename =~ m{[/-]x86_64/};
447        $arch = 'i386' if $pkg->filename =~ m{[/-](i[356]86)/};
448        $arch = 'noarch' if $pkg->filename =~ m{[/-]noarch/};
449    
450      my $rpmhash = { base  => $src,      my $rpmhash = { base  => $src,
451                      name  => $pkg->name,                      name  => $pkg->name,
# Line 447  sub process_rpm { Line 453  sub process_rpm {
453                      nvra  => $pkg->name.'-'.$pkg->version.'-'.$pkg->release.'.'.( $pkg->is_source_package ? 'src' : $pkg->tag('ARCH') ),                      nvra  => $pkg->name.'-'.$pkg->version.'-'.$pkg->release.'.'.( $pkg->is_source_package ? 'src' : $pkg->tag('ARCH') ),
454                      svr   => $src.'-'.$version.'-'.$release,                      svr   => $src.'-'.$version.'-'.$release,
455                      src   => $pkg->is_source_package,                      src   => $pkg->is_source_package,
456                        arch  => $arch,
457                      ver   => $version,                      ver   => $version,
458                      rel   => $release,                      rel   => $release,
459                      rpm   => $pkg,                      rpm   => $pkg,


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