/[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.11 by slords, Sun Jun 3 04:13:57 2007 UTC Revision 1.17 by slords, Thu Jul 5 14:17:56 2007 UTC
# Line 27  my @repos = ( Line 27  my @repos = (
27                "$releasedir/$smerel/smeupdates-testing/$arch/RPMS",                "$releasedir/$smerel/smeupdates-testing/$arch/RPMS",
28                "$releasedir/$smerel/smeextras/$arch/RPMS",                "$releasedir/$smerel/smeextras/$arch/RPMS",
29                "$releasedir/$smerel/smeaddons/$arch/RPMS",                "$releasedir/$smerel/smeaddons/$arch/RPMS",
30                  "$releasedir/$smerel/smecontribs/$arch/RPMS",
31                "$releasedir/$smerel/smetest/$arch/RPMS",                "$releasedir/$smerel/smetest/$arch/RPMS",
32                "$releasedir/$smerel/smedev/$arch/RPMS",                "$releasedir/$smerel/smedev/$arch/RPMS",
33                "$builds/RPMS/$arch",                "$builds/RPMS/$arch",
# Line 43  my @srcrepos = ( Line 44  my @srcrepos = (
44                   "/mirrors/centos/$centosrel/extras/SRPMS",                   "/mirrors/centos/$centosrel/extras/SRPMS",
45                   "/mirrors/rpmforge/dag/source",                   "/mirrors/rpmforge/dag/source",
46                   "/mirrors/atrpms/src/el$centosrel-$arch/atrpms/stable",                   "/mirrors/atrpms/src/el$centosrel-$arch/atrpms/stable",
47                     "/mirrors/atrpms/src/el$centosrel-$arch/atrpms/testing",
48                   "/mirrors/fedora/epel/$centosrel/SRPMS",                   "/mirrors/fedora/epel/$centosrel/SRPMS",
49                   "/mirrors/fedora/core/updates/$fedorarel/SRPMS",                   "/mirrors/fedora/core/updates/$fedorarel/SRPMS",
50                   "/mirrors/fedora/core/$fedorarel/source/SRPMS",                   "/mirrors/fedora/core/$fedorarel/source/SRPMS",
# Line 109  foreach my $repo ( reverse @srcrepos ) { Line 111  foreach my $repo ( reverse @srcrepos ) {
111  }  }
112    
113  my @latest;  my @latest;
114  foreach my $rpm ( reverse grep { $_->{repo} =~ m{^$releasedir/$smerel/} && $_->{repo} !~ m{/smedev$} } @rpms )  {  foreach my $rpm ( reverse grep { $_->{repo} =~ m{^$releasedir/$smerel/} && $_->{repo} !~ m{/sme(addons|contribs|dev|extras)$} } @rpms )  {
115          unless ( grep { $_->{name} eq $rpm->{name} && $_->{rpm} gt $rpm->{rpm} } @latest ) {          unless ( grep { $_->{name} eq $rpm->{name} && $_->{rpm} gt $rpm->{rpm} } @latest ) {
116                  push @latest, $rpm;                  push @latest, $rpm;
117                  unless ( grep { $_->{repo} eq $stagedir && $_->{filename} eq $rpm->{filename} } @rpms ) {                  unless ( grep { $_->{repo} eq $stagedir && $_->{filename} eq $rpm->{filename} } @rpms ) {
# Line 130  foreach my $rpm ( grep { $_->{repo} eq $ Line 132  foreach my $rpm ( grep { $_->{repo} eq $
132          $rpm->{repo} = 'deleted' unless grep { $_->{filename} eq $rpm->{filename} } @latest;          $rpm->{repo} = 'deleted' unless grep { $_->{filename} eq $rpm->{filename} } @latest;
133  }  }
134    
135    foreach my $rpm ( reverse grep { $_->{repo} =~ m{^$releasedir/$smerel/} && $_->{repo} =~ m{/sme(addons|contribs|extras)$} } @rpms )  {
136            unless ( grep { $_->{name} eq $rpm->{name} && $_->{rpm} gt $rpm->{rpm} } @latest ) {
137                    push @latest, $rpm;
138            }
139    }
140    
141  my @devel;  my @devel;
142  my %versions;  my %versions;
143  foreach my $rpm ( grep { $_->{repo} eq 'builds' } @rpms )  {  foreach my $rpm ( grep { $_->{repo} eq 'builds' } @rpms )  {
# Line 200  foreach my $repo ( keys %srpms ) { Line 208  foreach my $repo ( keys %srpms ) {
208    
209  print "\n";  print "\n";
210  foreach my $repo ( sort keys %copy ) {  foreach my $repo ( sort keys %copy ) {
211          foreach my $rpm ( @{$copy{$repo}} ) {          foreach my $rpm ( keys %{{ map { $_ => 1 } @{$copy{$repo}} }} ) {
212                  print "copying $rpm to $repo/\n";                  print "copying $rpm to $repo/\n";
213                    mkdir "$repo" unless -d "$repo";
214                  system(qw(cp --preserve=timestamps), $rpm, "$repo/");                  system(qw(cp --preserve=timestamps), $rpm, "$repo/");
215          }          }
216  }  }
217    
218  print "\n";  print "\n";
219  foreach my $rpm ( @remove, map { $_->{rpm}->filename } grep { $_->{repo} eq 'deleted' } @rpms ) {  foreach my $rpm ( keys %{{ map { $_ => 1 } (@remove, map { $_->{rpm}->filename } grep { $_->{repo} eq 'deleted' } @rpms) }} ) {
220          print "removing $rpm\n";          print "removing $rpm\n";
221          unlink $rpm;          unlink $rpm;
222  }  }
# Line 218  foreach my $repo ( sort keys %changed ) Line 227  foreach my $repo ( sort keys %changed )
227          chomp $dir;          chomp $dir;
228          print "rebuilding $dir...\n";          print "rebuilding $dir...\n";
229          system(qw(createrepo), "$dir");          system(qw(createrepo), "$dir");
230            system(qw(rm -rf), "$dir/.olddata") if -d "$dir/.olddata";
231          system(qw(repoview), "$dir");          system(qw(repoview), "$dir");
232            system(qw(rm -rf), "$dir/.repodata") if "$dir/.repodata";
233  }  }


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