/[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.27 by slords, Thu Nov 8 19:19:26 2007 UTC Revision 1.29 by slords, Fri Nov 23 16:45:36 2007 UTC
# Line 26  my $repos = { 'smeos'              => { Line 26  my $repos = { 'smeos'              => {
26                'smeupdates-testing' => { prio => 16, inc => 1, ver => 1, rel => 1 },                'smeupdates-testing' => { prio => 16, inc => 1, ver => 1, rel => 1 },
27                'smeextras'          => { prio => 15, inc => 0, ver => 1, rel => 1 },                'smeextras'          => { prio => 15, inc => 0, ver => 1, rel => 1 },
28                'smeaddons'          => { prio => 14, inc => 0, ver => 1, rel => 1 },                'smeaddons'          => { prio => 14, inc => 0, ver => 1, rel => 1 },
29                'smecontribs'        => { prio => 13, inc => 0, ver => 1, rel => 1, contribs => 1 },                'smecontribs'        => { prio => 13, inc => 0, ver => 1, rel => 2, contribs => 1 },
30                'smetest'            => { prio => 12, inc => 1, ver => 2, rel => 2, devel => 2 },                'smetest'            => { prio => 12, inc => 0, ver => 2, rel => 2, devel => 2 },
31                'smedev'             => { prio => 11, inc => 0, ver => 2, rel => 2, devel => 1 },                'smedev'             => { prio => 11, inc => 0, ver => 2, rel => 2, devel => 1 },
32                '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 },
33                'fedora/epel'        => { prio =>  9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },                'fedora/epel'        => { prio =>  9, inc => 0, ver => 0, rel => 0, orig => 1, base => 1 },
# Line 149  foreach my $smever ( sort { $a <=> $b } Line 149  foreach my $smever ( sort { $a <=> $b }
149              # Move packages from base/builds to correct area              # Move packages from base/builds to correct area
150              elsif ( rprop($pkg, 'orig') ) {              elsif ( rprop($pkg, 'orig') ) {
151                  printline('dark blue', 1, '    - checking base/builds/contribs') if $opts{d};                  printline('dark blue', 1, '    - checking base/builds/contribs') if $opts{d};
152                  my $repo = $names{$pkg->{name}} && $names{$pkg->{name}} > 1 ? $devel2 : $devel1;                  my $repo = $names{$pkg->{name}} > 1 ? $devel2 : $devel1;
153                  $repo = $contribs if $pkg->{repo} eq 'contribs';                  $repo = $contribs if $pkg->{repo} eq 'contribs';
154                  if ( $pkg->{nonbase} ) {                  if ( $pkg->{nonbase} ) {
155                      foreach my $up ( @pkgs ) {                      foreach my $up ( @pkgs ) {
# Line 159  foreach my $smever ( sort { $a <=> $b } Line 159  foreach my $smever ( sort { $a <=> $b }
159                          last;                          last;
160                      }                      }
161                  }                  }
                 next if rprop($pkg, 'base') && $repo eq $devel1;  
162                  movepkg($pkg, $repo);                  movepkg($pkg, $repo);
163                  %names = names($pkg, @pkgs);                  %names = names($pkg, @pkgs);
164                  $seen{$pkg->{nvra}}++;                  $seen{$pkg->{nvra}}++;
# Line 240  foreach my $smever ( sort { $a <=> $b } Line 239  foreach my $smever ( sort { $a <=> $b }
239                              $orig++ if rprop($cmp, 'orig');                              $orig++ if rprop($cmp, 'orig');
240                              movepkg($cmp, 'delete', 1);                              movepkg($cmp, 'delete', 1);
241                          } else {                          } else {
242                              movepkg($cmp, $pkg->{repo}, 1, 1);                              unless ( $pkg->{repo} eq $devel1 && $devel1 ne $devel2 && $names{$cmp->{name}} > 1 ) {
243                              $seen{$cmp->{nvra}}++;                                  movepkg($cmp, $pkg->{repo}, 1, 1);
244                                    $seen{$cmp->{nvra}}++;
245                                }
246                          }                          }
247                      } else {                      } else {
248                          tagpkg($cmp, 'nonbase');                          tagpkg($cmp, 'nonbase');
# Line 463  sub printline { Line 464  sub printline {
464    
465  sub loadpkg {  sub loadpkg {
466      printline('white', 0, "Loading: $_") if -d _;      printline('white', 0, "Loading: $_") if -d _;
467      return unless m{/([^/]*)-[^-]+-[^-]+\.\w+.rpm} && ( ! $opts{r} || $1 =~ m{$opts{r}} );      return unless m{/([^/]*)-[^-]+-[^-]+\.\w+\.rpm$} && ( ! $opts{r} || $1 =~ m{$opts{r}} );
468    
469      my $pkg;      my $pkg;
470      eval { $pkg = RPM2->open_package($_, $rpm_flags); };      eval { $pkg = RPM2->open_package($_, $rpm_flags); };
# Line 471  sub loadpkg { Line 472  sub loadpkg {
472      eval { my $sig = $pkg->siggpg };      eval { my $sig = $pkg->siggpg };
473      my $nosig = ! $@;      my $nosig = ! $@;
474            
475      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$};
476      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}}; }
477      my $reponame = 'unknown';      my $reponame = 'unknown';
478      if ( substr($_, 0, length($distrepo->{$rel}->{builds})) eq $distrepo->{$rel}->{builds} ) {      if ( substr($_, 0, length($distrepo->{$rel}->{builds})) eq $distrepo->{$rel}->{builds} ) {
# Line 505  sub loadpkg { Line 506  sub loadpkg {
506    
507  sub loadbase {  sub loadbase {
508      printline('white', 0, "Loading: $_") if -d _;      printline('white', 0, "Loading: $_") if -d _;
509      return unless m{/([^/]*)-[^-]+-[^-]+\.\w+.rpm} && ($latest{$1} || $sources{$1});      return unless m{/([^/]*)-[^-]+-[^-]+\.\w+\.rpm$} && ($latest{$1} || $sources{$1});
510    
511      my $pkg;      my $pkg;
512      eval { $pkg = RPM2->open_package($_, $rpm_flags); };      eval { $pkg = RPM2->open_package($_, $rpm_flags); };
# Line 514  sub loadbase { Line 515  sub loadbase {
515      unless ($@) { printline('bold yellow on_red', 1, ' - ', $pkg->filename, ' (missing signature)'); return; }      unless ($@) { printline('bold yellow on_red', 1, ' - ', $pkg->filename, ' (missing signature)'); return; }
516    
517      my $cmp = $latest{$pkg->name};      my $cmp = $latest{$pkg->name};
518      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$};
519      my $pkgrepo = 'base';      my $pkgrepo = 'base';
520      foreach my $repo ( keys %{$skippkg->{$rel}} ) {      foreach my $repo ( keys %{$skippkg->{$rel}} ) {
521          if ( (dirname $pkg->filename) =~ m{/$repo/} ) {          if ( (dirname $pkg->filename) =~ m{/$repo/} ) {


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