/[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.51 by slords, Mon Oct 26 22:02:53 2009 UTC Revision 1.52 by slords, Tue Dec 1 16:17:48 2009 UTC
# Line 20  $opts{r} ||= ''; Line 20  $opts{r} ||= '';
20  my $rpm_flags = RPM2->vsf_nosha1header | RPM2->vsf_nomd5header | RPM2->vsf_nodsaheader | RPM2->vsf_norsaheader;  my $rpm_flags = RPM2->vsf_nosha1header | RPM2->vsf_nomd5header | RPM2->vsf_nodsaheader | RPM2->vsf_norsaheader;
21  $rpm_flags |= RPM2->vsf_nosha1 | RPM2->vsf_nomd5 | RPM2->vsf_nodsa | RPM2->vsf_norsa;  $rpm_flags |= RPM2->vsf_nosha1 | RPM2->vsf_nomd5 | RPM2->vsf_nodsa | RPM2->vsf_norsa;
22    
23    my $osdir = 'SME';
24    my $disttag = 'sme';
25    my $repotag = 'sme';
26    
27  my @archs = ( 'i386', 'x86_64' );  my @archs = ( 'i386', 'x86_64' );
28    
29  my $distrepo = { '7' => { active   => 1,  my $distrepo = { '7' => { active   => 1,
# Line 42  my $distrepo = { '7' => { active   => 1, Line 46  my $distrepo = { '7' => { active   => 1,
46                          },                          },
47                 };                 };
48    
49  my $repos = { 'smeos'              => { prio => 18, inc => 1, ver => 1, rel => 1, os => 1 },  my $repos = { "${repotag}os"              => { prio => 18, inc => 1, ver => 1, rel => 1, os => 1 },
50                'smeupdates'         => { prio => 17, inc => 1, ver => 1, rel => 1 },                "${repotag}updates"         => { prio => 17, inc => 1, ver => 1, rel => 1 },
51                'smeupdates-testing' => { prio => 16, inc => 1, ver => 1, rel => 3 },                "${repotag}updates-testing" => { prio => 16, inc => 1, ver => 1, rel => 3 },
52                'smeextras'          => { prio => 15, inc => 0, ver => 1, rel => 1 },                "${repotag}extras"          => { prio => 15, inc => 0, ver => 1, rel => 1 },
53                'smeaddons'          => { prio => 14, inc => 0, ver => 1, rel => 1 },                "${repotag}addons"          => { prio => 14, inc => 0, ver => 1, rel => 1 },
54                'smecontribs'        => { prio => 13, inc => 0, ver => 1, rel => 1 },                "${repotag}contribs"        => { prio => 13, inc => 0, ver => 1, rel => 1 },
55                'smetest'            => { prio => 12, inc => 0, ver => 2, rel => 3, devel => 2 },                "${repotag}test"            => { prio => 12, inc => 0, ver => 2, rel => 3, devel => 2 },
56                'smedev'             => { prio => 11, inc => 0, ver => 1, rel => 1, devel => 1 },                "${repotag}dev"             => { prio => 11, inc => 0, ver => 1, rel => 1, devel => 1 },
57                '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 },
58                'epel'               => { prio =>  9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'epel'                      => { prio =>  9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
59                'fedora-extras'      => { prio =>  8, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'fedora-extras'             => { prio =>  8, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
60                'rpmforge'           => { prio =>  7, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'rpmforge'                  => { prio =>  7, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
61                'atrpms'             => { prio =>  6, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'atrpms'                    => { prio =>  6, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
62                'fedora'             => { prio =>  5, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'fedora'                    => { prio =>  5, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
63                'builds'             => { prio =>  4, inc => 0, ver => 0, rel => 0, orig => 1 },                'builds'                    => { prio =>  4, inc => 0, ver => 0, rel => 0, orig => 1 },
64                'contribs'           => { prio =>  2, inc => 0, ver => 0, rel => 0, orig => 1 },                'contribs'                  => { prio =>  2, inc => 0, ver => 0, rel => 0, orig => 1 },
65                'stage'              => { prio =>  1, inc => 0, ver => 0, rel => 0, stage => 1, os => 1 },                'stage'                     => { prio =>  1, inc => 0, ver => 0, rel => 0, stage => 1, os => 1 },
66              };              };
67    
68  my $baserepo = { '~Ssmeos/~A/SME/~O' => 'smeos',  my $baserepo = { "~S${repotag}os/~A/$osdir/~O" => "${repotag}os",
69                   '~Ssmeupdates/~A/RPMS/' => 'smeupdates',                   "~S${repotag}updates/~A/RPMS/" => "${repotag}updates",
70                   '~Ssmeupdates-testing/~A/RPMS/' => 'smeupdates-testing',                   "~S${repotag}updates-testing/~A/RPMS/" => "${repotag}updates-testing",
71                   '~Ssmeextras/~A/RPMS/' => 'smeextras',                   "~S${repotag}extras/~A/RPMS/" => "${repotag}extras",
72                   '~Ssmeaddons/~A/RPMS/' => 'smeaddons',                   "~S${repotag}addons/~A/RPMS/" => "${repotag}addons",
73                   '~Ssmecontribs/~A/RPMS/' => 'smecontribs',                   "~S${repotag}contribs/~A/RPMS/" => "${repotag}contribs",
74                   '~Ssmetest/~A/RPMS/' => 'smetest',                   "~S${repotag}test/~A/RPMS/" => "${repotag}test",
75                   '~Ssmedev/~A/RPMS/' => 'smedev',                   "~S${repotag}dev/~A/RPMS/" => "${repotag}dev",
76                   '/stage/~s/~A/SME/~O' => 'stage',                   "/stage/~s/~A/$osdir/~O" => 'stage',
77                   '/mirrors/centos/~C/fasttrack/~A/RPMS/' => 'centos',                   '/mirrors/centos/~C/fasttrack/~A/RPMS/' => 'centos',
78                   '/mirrors/centos/~C/updates/~A/RPMS/' => 'centos',                   '/mirrors/centos/~C/updates/~A/RPMS/' => 'centos',
79                   '/mirrors/centos/~C/os/~A/CentOS/~O' => 'centos',                   '/mirrors/centos/~C/os/~A/CentOS/~O' => 'centos',
# Line 113  my ($devel1, $devel2) = sort { $repos->{ Line 117  my ($devel1, $devel2) = sort { $repos->{
117  $devel2 ||= $devel1;  $devel2 ||= $devel1;
118    
119  my ($rpms, %base, %latest, %sources);  my ($rpms, %base, %latest, %sources);
120  foreach my $smever ( sort { $a <=> $b } keys %$distrepo ) {  foreach my $ver ( sort { $a <=> $b } keys %$distrepo ) {
121      next unless $distrepo->{$smever}->{active};      next unless $distrepo->{$ver}->{active};
122      my %repochg = ();      my %repochg = ();
123      $rpms = ();      $rpms = ();
124      %latest = ();      %latest = ();
# Line 123  foreach my $smever ( sort { $a <=> $b } Line 127  foreach my $smever ( sort { $a <=> $b }
127    
128      foreach my $dir  ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) {      foreach my $dir  ( sort { $repos->{$baserepo->{$b}}->{prio} <=> $repos->{$baserepo->{$a}}->{prio} || $a cmp $b } keys %$baserepo ) {
129          my $bdir = $dir;          my $bdir = $dir;
130          $bdir =~ s/~O/$distrepo->{$smever}->{os}/;          $bdir =~ s/~O/$distrepo->{$ver}->{os}/;
131          $bdir =~ s/~S/$distrepo->{$smever}->{repo}/;          $bdir =~ s/~S/$distrepo->{$ver}->{repo}/;
132          $bdir =~ s/~s/$smever/;          $bdir =~ s/~s/$ver/;
133          $bdir =~ s/~C/$distrepo->{$smever}->{centos}/;          $bdir =~ s/~C/$distrepo->{$ver}->{centos}/;
134          $bdir =~ s/~F/$distrepo->{$smever}->{fedora}/;          $bdir =~ s/~F/$distrepo->{$ver}->{fedora}/;
135          for my $arch ( @archs, 'SRPMS/' ) {          for my $arch ( @archs, 'SRPMS/' ) {
136              my $adir = $bdir;              my $adir = $bdir;
137              if ( $arch eq 'SRPMS/' ) {              if ( $arch eq 'SRPMS/' ) {
# Line 137  foreach my $smever ( sort { $a <=> $b } Line 141  foreach my $smever ( sort { $a <=> $b }
141              }              }
142              opendir DIR, $adir or next;              opendir DIR, $adir or next;
143              next unless -d $adir;              next unless -d $adir;
144              process_rpm("$adir$_", $smever, $baserepo->{$dir}) foreach readdir DIR;              process_rpm("$adir$_", $ver, $baserepo->{$dir}) foreach readdir DIR;
145              closedir DIR;              closedir DIR;
146              last unless $dir =~ m{~A};              last unless $dir =~ m{~A};
147          }          }
148      }      }
149      find( { wanted => sub { process_rpm($_, $smever, 'builds'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$smever}->{'builds'} );      find( { wanted => sub { process_rpm($_, $ver, 'builds'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$ver}->{'builds'} );
150      find( { wanted => sub { process_rpm($_, $smever, 'contribs'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$smever}->{'contribs'} );      find( { wanted => sub { process_rpm($_, $ver, 'contribs'); }, no_chdir => 1, follow_fast => 1 }, $distrepo->{$ver}->{'contribs'} );
151    
152      foreach my $base ( sort keys %$rpms ) {      foreach my $base ( sort keys %$rpms ) {
153          next unless $rpms->{$base}->{rpms};          next unless $rpms->{$base}->{rpms};
# Line 163  foreach my $smever ( sort { $a <=> $b } Line 167  foreach my $smever ( sort { $a <=> $b }
167                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.at$}{}                 && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.at$}{}                 && $rpms->{$base}->{vers}->{$tmp} && last SRC;
168                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.at$}{}                 && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.at$}{}                 && $rpms->{$base}->{vers}->{$tmp} && last SRC;
169                  ($tmp = $pkg->{svr}) =~ s{\.el\d(\.rf)$}{$1}             && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{\.el\d(\.rf)$}{$1}             && $rpms->{$base}->{vers}->{$tmp} && last SRC;
170                    ($tmp = $pkg->{svr}) =~ s{\.el\d\.rf$}{.el5}             && $rpms->{$base}->{vers}->{$tmp} && last SRC;
171                  ($tmp = $pkg->{svr}) =~ s{(\d+)\.\d+\.el\d(\.rf)$}{$1$2} && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{(\d+)\.\d+\.el\d(\.rf)$}{$1$2} && $rpms->{$base}->{vers}->{$tmp} && last SRC;
172                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.rf$}{.dag}             && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.rf$}{.dag}             && $rpms->{$base}->{vers}->{$tmp} && last SRC;
173                  ($tmp = $pkg->{svr}) =~ s{(\d+)\.\d+\.el\d\.rf$}{$1.dag} && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{(\d+)\.\d+\.el\d\.rf$}{$1.dag} && $rpms->{$base}->{vers}->{$tmp} && last SRC;
174                  ($tmp = $pkg->{svr}) =~ s{\.el\d$}{}                     && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{\.el\d$}{}                     && $rpms->{$base}->{vers}->{$tmp} && last SRC;
175                  ($tmp = $pkg->{svr}) =~ s{(-\d+)\.\d+\.el\d$}{$1}        && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{(-\d+)\.\d+\.el\d$}{$1}        && $rpms->{$base}->{vers}->{$tmp} && last SRC;
176                  ($tmp = $pkg->{svr}) =~ s{\.centos\d$}{}                 && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{\.centos\d$}{}                 && $rpms->{$base}->{vers}->{$tmp} && last SRC;
177                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.sme$}{}                && $rpms->{$base}->{vers}->{$tmp} && last SRC;                  ($tmp = $pkg->{svr}) =~ s{\.el\d\.$disttag$}{}                && $rpms->{$base}->{vers}->{$tmp} && last SRC;
178              }              }
179              if ( $rpms->{$base}->{vers}->{$tmp} ) {              if ( $rpms->{$base}->{vers}->{$tmp} ) {
180                  foreach $tmp ( @{$rpms->{$base}->{vers}->{$tmp}} ) {                  foreach $tmp ( @{$rpms->{$base}->{vers}->{$tmp}} ) {
# Line 210  foreach my $smever ( sort { $a <=> $b } Line 215  foreach my $smever ( sort { $a <=> $b }
215                              } elsif ( $repos->{$cmp->{repo}}->{orig}) {                              } elsif ( $repos->{$cmp->{repo}}->{orig}) {
216                                  $orig{$cmp->{nvra}}++;                                  $orig{$cmp->{nvra}}++;
217                                  unless ( $repos->{$cmp->{repo}}->{base} ) {                                  unless ( $repos->{$cmp->{repo}}->{base} ) {
218                                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel};                                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$ver}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel};
219                                      qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED";                                      qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED";
220                                  }                                  }
221                              } elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) {                              } elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) {
# Line 231  foreach my $smever ( sort { $a <=> $b } Line 236  foreach my $smever ( sort { $a <=> $b }
236                              if ( $repos->{$cmp->{repo}}->{orig} ) {                              if ( $repos->{$cmp->{repo}}->{orig} ) {
237                                  $orig{$cmp->{nvra}}++;                                  $orig{$cmp->{nvra}}++;
238                                  unless ( $repos->{$cmp->{repo}}->{base} ) {                                  unless ( $repos->{$cmp->{repo}}->{base} ) {
239                                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel};                                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$ver}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel};
240                                      qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED";                                      qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED";
241                                  }                                  }
242                              } elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) {                              } elsif ( $cmp->{src} && $reposrc{$cmp->{repo}} ) {
# Line 269  foreach my $smever ( sort { $a <=> $b } Line 274  foreach my $smever ( sort { $a <=> $b }
274                                  $cmp->{delete}++;                                  $cmp->{delete}++;
275                              } elsif ( $repos->{$dest}->{prio} >= $repos->{$track{repo}}->{prio} && ! verrel($cmp, $dest, \%counts) ) {                              } elsif ( $repos->{$dest}->{prio} >= $repos->{$track{repo}}->{prio} && ! verrel($cmp, $dest, \%counts) ) {
276                                  unless ( $repos->{$cmp->{repo}}->{base} ) {                                  unless ( $repos->{$cmp->{repo}}->{base} ) {
277                                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel};                                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$ver}->{$cmp->{repo}}, $cmp->{name}, $cmp->{ver}, $cmp->{rel};
278                                      qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED";                                      qx(touch $tag/PUSHED) if ! $opts{t} && -d $tag && ! -f "$tag/PUSHED";
279                                  }                                  }
280                                  push @{$cmp->{repos}}, $dest;                                  push @{$cmp->{repos}}, $dest;
# Line 307  foreach my $smever ( sort { $a <=> $b } Line 312  foreach my $smever ( sort { $a <=> $b }
312                      }                      }
313                  }                  }
314              } elsif ( scalar keys %pkgs && $opts{s} ) {              } elsif ( scalar keys %pkgs && $opts{s} ) {
315                  print "\n * missing source (sme$smever, ", $pkg->{repo}, ", ", $pkg->{svr}, ")\n";                  print "\n * missing source ($disttag$ver, ", $pkg->{repo}, ", ", $pkg->{svr}, ")\n";
316              }              }
317              print "\n * missing originals (sme$smever, ", $pkg->{repo}, ", ", $pkg->{svr}, ")\n" if $opts{o} && scalar keys %orig != scalar keys %pkgs;              print "\n * missing originals ($disttag$ver, ", $pkg->{repo}, ", ", $pkg->{svr}, ")\n" if $opts{o} && scalar keys %orig != scalar keys %pkgs;
318          }          }
319    
320          foreach my $r ( keys %$acnt ) {          foreach my $r ( keys %$acnt ) {
# Line 335  foreach my $smever ( sort { $a <=> $b } Line 340  foreach my $smever ( sort { $a <=> $b }
340                  push @{$pkg->{repos}}, $stage;                  push @{$pkg->{repos}}, $stage;
341              }              }
342              if ( ! $print && ($pkg->{delete} || $pkg->{repos} || $pkg->{nosig} ) ) {              if ( ! $print && ($pkg->{delete} || $pkg->{repos} || $pkg->{nosig} ) ) {
343                  print "\n$base (sme$smever)\n", "=" x length("$base (sme$smever)"), "\n";                  print "\n$base ($disttag$ver)\n", "=" x length("$base ($disttag$ver)"), "\n";
344                  $print++;                  $print++;
345              }              }
346    
# Line 366  foreach my $smever ( sort { $a <=> $b } Line 371  foreach my $smever ( sort { $a <=> $b }
371                      $pkg->{oldrepo} = $repo unless $pkg->{oldrepo} eq ${$pkg->{repos}}[0];                      $pkg->{oldrepo} = $repo unless $pkg->{oldrepo} eq ${$pkg->{repos}}[0];
372    
373                      my @d = ();                      my @d = ();
374                      my $head = $distrepo->{$smever}->{repo} . $repo . '/';                      my $head = $distrepo->{$ver}->{repo} . $repo . '/';
375                      $head = $distrepo->{$smever}->{stage} if $repos->{$repo}->{stage};                      $head = $distrepo->{$ver}->{stage} if $repos->{$repo}->{stage};
376                      my $tail = $repos->{$repo}->{os} ? 'SME/' . $distrepo->{$smever}->{os} : 'RPMS/';                      my $tail = $repos->{$repo}->{os} ? "$osdir/" . $distrepo->{$ver}->{os} : 'RPMS/';
377                      if ( $pkg->{src} ) {                      if ( $pkg->{src} ) {
378                          push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename);                          push @d, "${head}SRPMS/" . basename($pkg->{rpm}->filename);
379                      } elsif ( $pkg->{rpm}->arch eq 'noarch' ) {                      } elsif ( $pkg->{rpm}->arch eq 'noarch' ) {
# Line 389  foreach my $smever ( sort { $a <=> $b } Line 394  foreach my $smever ( sort { $a <=> $b }
394                  qx(rm -f $src) unless $opts{t};                  qx(rm -f $src) unless $opts{t};
395                  $repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage};                  $repochg{$pkg->{repo}}++ unless $repos->{$pkg->{repo}}->{base} || $repos->{$pkg->{repo}}->{stage};
396                  if ( $repos->{$pkg->{repo}}->{orig} && ! $repos->{$pkg->{repo}}->{base} ) {                  if ( $repos->{$pkg->{repo}}->{orig} && ! $repos->{$pkg->{repo}}->{base} ) {
397                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$smever}->{$pkg->{repo}}, $pkg->{name}, $pkg->{ver}, $pkg->{rel};                      my $tag = sprintf '%s%s/%s-%s', $distrepo->{$ver}->{$pkg->{repo}}, $pkg->{name}, $pkg->{ver}, $pkg->{rel};
398                      qx(rm -f $tag/PUSHED) if ! $opts{t} && -d $tag && -f "$tag/PUSHED";                      qx(rm -f $tag/PUSHED) if ! $opts{t} && -d $tag && -f "$tag/PUSHED";
399                  }                  }
400              }              }
# Line 397  foreach my $smever ( sort { $a <=> $b } Line 402  foreach my $smever ( sort { $a <=> $b }
402      }      }
403    
404      if ( %repochg ) {      if ( %repochg ) {
405          print "\nrebuild repo (sme$smever)\n", "=" x length("rebuild repo (sme$smever)"), "\n";          print "\nrebuild repo ($disttag$ver)\n", "=" x length("rebuild repo ($disttag$ver)"), "\n";
406      }      }
407      foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) {      foreach my $repo ( sort { $repos->{$b}->{prio} <=> $repos->{$a}->{prio} } keys %repochg ) {
408          next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage};          next if $repos->{$repo}->{orig} || $repos->{$repo}->{stage};
409          foreach my $arch ( @archs ) {          foreach my $arch ( @archs ) {
410              my $dir = $distrepo->{$smever}->{repo} . "$repo/$arch";              my $dir = $distrepo->{$ver}->{repo} . "$repo/$arch";
411              $dir = qx(readlink -f $dir);              $dir = qx(readlink -f $dir);
412              chomp $dir;              chomp $dir;
413              print "rebuild $repo/$arch\n";              print "rebuild $repo/$arch\n";
# Line 419  foreach my $smever ( sort { $a <=> $b } Line 424  foreach my $smever ( sort { $a <=> $b }
424          }          }
425      }      }
426      unless ( $opts{t} ) {      unless ( $opts{t} ) {
427          finddepth(sub{rmdir}, $distrepo->{$smever}->{$_}) foreach ('builds','contribs');          finddepth(sub{rmdir}, $distrepo->{$ver}->{$_}) foreach ('builds','contribs');
428      }      }
429  }  }
430    
# Line 456  sub pkgdest { Line 461  sub pkgdest {
461    
462  sub process_rpm {  sub process_rpm {
463      my $rpm = shift;      my $rpm = shift;
464      my $smever = shift;      my $ver = shift;
465      my $repo = shift;      my $repo = shift;
466      return unless $rpm =~ m{/([^/]*)-[^-]+-[^-]+\.\w+\.rpm$};      return unless $rpm =~ m{/([^/]*)-[^-]+-[^-]+\.\w+\.rpm$};
467      my $base = $1;      my $base = $1;
# Line 475  sub process_rpm { Line 480  sub process_rpm {
480          return if $repos->{$cmp->{repo}}->{base} && $repos->{$cmp->{repo}}->{prio} > $repos->{$repo}->{prio} && $pkg ge $cmp->{rpm};          return if $repos->{$cmp->{repo}}->{base} && $repos->{$cmp->{repo}}->{prio} > $repos->{$repo}->{prio} && $pkg ge $cmp->{rpm};
481      }      }
482      my ($src, $version, $release) = ($pkg->is_source_package ? $pkg->filename : $pkg->sourcerpm) =~ m{(?:^|/)([^/]*)-([^-]+)-([^-]+)\.\w+\.rpm$};      my ($src, $version, $release) = ($pkg->is_source_package ? $pkg->filename : $pkg->sourcerpm) =~ m{(?:^|/)([^/]*)-([^-]+)-([^-]+)\.\w+\.rpm$};
483      return if $skippkg->{$smever}->{$repo} && ( $skippkg->{$smever}->{$repo}->{$src} || $skippkg->{$smever}->{$repo}->{$pkg->name} );      return if $skippkg->{$ver}->{$repo} && ( $skippkg->{$ver}->{$repo}->{$src} || $skippkg->{$ver}->{$repo}->{$pkg->name} );
484      return if $repos->{$repo}->{base} && $nosig;      return if $repos->{$repo}->{base} && $nosig;
485      if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; }      if ( $nosig && ! -f "$HOME/.rpmpass" ) { print " * missing signature (" .$pkg->filename . ")\n"; return; }
486      my $arch = 'unknown';      my $arch = 'unknown';


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