/[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.24 by slords, Wed Nov 7 19:31:20 2007 UTC Revision 1.26 by slords, Thu Nov 8 17:12:31 2007 UTC
# Line 137  foreach my $smever ( sort { $a <=> $b } Line 137  foreach my $smever ( sort { $a <=> $b }
137    
138              # Stage packages should never be most current              # Stage packages should never be most current
139              if ( rprop($pkg, 'stage') ) {              if ( rprop($pkg, 'stage') ) {
140                    printline('dark blue', 1, '    - checking stage') if $opts{d};
141                  tagpkg($pkg, 'obsolete');                  tagpkg($pkg, 'obsolete');
142                  next;                  next;
143              }              }
# Line 188  foreach my $smever ( sort { $a <=> $b } Line 189  foreach my $smever ( sort { $a <=> $b }
189                                  tagpkg($cmp, 'inuse');                                  tagpkg($cmp, 'inuse');
190                                  $pkg->{srpm}->{latest}++;                                  $pkg->{srpm}->{latest}++;
191                              }                              }
192                              tagpkg($cmp, 'inuse') if $pkg->{repo} eq $cmp->{repo} || rprop($cmp, 'base') || rprop($cmp, 'builds');                              if ( $pkg->{repo} eq $cmp->{repo} || rprop($cmp, 'base') || rprop($cmp, 'builds') || ( $cmp->{oldrepo} && $pkg->{repo} eq $cmp->{oldrepo} ) ) {
193                                    tagpkg($cmp, 'inuse')
194                                }
195                          }                          }
196                          next if $pkg->{srpm} && $pkg->{srpm}->{rpm} eq $pkg->{rpm};                          next if $pkg->{srpm} && $pkg->{srpm}->{rpm} eq $pkg->{rpm};
197    
# Line 245  foreach my $smever ( sort { $a <=> $b } Line 248  foreach my $smever ( sort { $a <=> $b }
248              printline('dark blue', 1, '    - checking source packages') if $opts{d};              printline('dark blue', 1, '    - checking source packages') if $opts{d};
249              if ( ! $pkg->{srpm} ) {              if ( ! $pkg->{srpm} ) {
250                  printline('bold yellow on_red', 1, ' - ', $pkg->{rpm}->filename, ' (missing source ', $pkg->{rpm}->sourcerpm, ')');                  printline('bold yellow on_red', 1, ' - ', $pkg->{rpm}->filename, ' (missing source ', $pkg->{rpm}->sourcerpm, ')');
251              } elsif ( $pkg->{srpm}->{repo} ne $pkg->{repo} ) {              } elsif ( $pkg->{srpm}->{repo} ne $pkg->{repo} && ( ! $pkg->{srpm}->{oldrepo} || $pkg->{srpm}->{oldrepo} ne $pkg->{repo} ) ) {
252                  movepkg($pkg->{srpm}, $pkg->{repo}, 0);                  movepkg($pkg->{srpm}, $pkg->{repo}, 0);
253              }              }
254              unless ( $orig ) {              unless ( $orig ) {
# Line 254  foreach my $smever ( sort { $a <=> $b } Line 257  foreach my $smever ( sort { $a <=> $b }
257                  }                  }
258              }              }
259          }          }
         printline('bold black', 1, ' - missing stage packages') if $opts{d};  
         movepkg($_, $stage, 0) foreach grep { $_->{latest} && $_->{latest} == 1 } @pkgs;  
   
         printline('bold black', 1, ' - obsolete packages') if $opts{d};  
         movepkg($_, 'delete') foreach grep { ! rprop($_, 'base') && ! $_->{done} && ( $_->{obsolete} || ( $_->{rpm}->is_source_package && ! $_->{inuse} ) ) } @pkgs;  
   
260          printline('bold black', 1, ' - arch count check') if $opts{d};          printline('bold black', 1, ' - arch count check') if $opts{d};
261          foreach my $r ( keys %$archs ) {          foreach my $r ( keys %$archs ) {
262              foreach my $p ( keys %{$archs->{$r}} ) {              foreach my $p ( keys %{$archs->{$r}} ) {
# Line 273  foreach my $smever ( sort { $a <=> $b } Line 270  foreach my $smever ( sort { $a <=> $b }
270                  }                  }
271              }              }
272          }          }
273    
274            printline('bold black', 1, ' - missing stage packages') if $opts{d};
275            movepkg($_, $stage, 0) foreach grep { $_->{latest} && $_->{latest} == 1 } @pkgs;
276    
277            printline('bold black', 1, ' - obsolete packages') if $opts{d};
278            movepkg($_, 'delete') foreach grep { ! rprop($_, 'base') && ! $_->{done} && ( $_->{obsolete} || ( $_->{rpm}->is_source_package && ! $_->{inuse} ) ) } @pkgs;
279      }      }
280      printline('white', 0, "Finished processing.\n");      printline('white', 0, "Finished processing.\n");
281    
# Line 462  sub loadpkg { Line 465  sub loadpkg {
465      if ($@) { printline('bold yellow on_red', 1, "Corrupt package $_"); return; }      if ($@) { printline('bold yellow on_red', 1, "Corrupt package $_"); return; }
466      eval { my $sig = $pkg->siggpg };      eval { my $sig = $pkg->siggpg };
467      my $nosig = ! $@;      my $nosig = ! $@;
     if ( $nosig && ! -f "$HOME/.rpmpass" ) {  
         printline('bold yellow on_red', 1, ' - ', $pkg->filename, ' (missing signature)');  
         return;  
     }  
468            
469      my ($srcname, $version, $release) = ($pkg->is_source_package ? basename $pkg->filename : $pkg->sourcerpm) =~ m{^([^/]*)-([^-]+)-([^-]+)\.\w+.rpm};      my ($srcname, $version, $release) = ($pkg->is_source_package ? basename $pkg->filename : $pkg->sourcerpm) =~ m{^([^/]*)-([^-]+)-([^-]+)\.\w+.rpm};
470      foreach my $repo ( keys %{$skippkg->{$rel}} ) { return if (dirname $pkg->filename) =~ m{/$repo/} && grep { $_ eq $srcname } @{$skippkg->{$rel}->{$repo}}; }      foreach my $repo ( keys %{$skippkg->{$rel}} ) { return if (dirname $pkg->filename) =~ m{/$repo/} && grep { $_ eq $srcname } @{$skippkg->{$rel}->{$repo}}; }
# Line 477  sub loadpkg { Line 476  sub loadpkg {
476      } elsif ( (dirname $pkg->filename) =~ m{\d/(sme[^/]+)/} ) {      } elsif ( (dirname $pkg->filename) =~ m{\d/(sme[^/]+)/} ) {
477          $reponame = $1;          $reponame = $1;
478      }      }
479        if ( $nosig && ( ! -f "$HOME/.rpmpass" || $reponame eq 'builds' ) ) {
480            printline('bold yellow on_red', 1, ' - ', $pkg->filename, ' (missing signature)');
481            return;
482        }
483      push @rpms, { base    => $srcname,      push @rpms, { base    => $srcname,
484                    name    => $pkg->name,                    name    => $pkg->name,
485                    repo    => $reponame,                    repo    => $reponame,


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