127 |
@{$repohash{$pkg}{$pos}} = grep { $_ gt $repohash{$pkg}{latest} } @{$repohash{$pkg}{$pos}}; |
@{$repohash{$pkg}{$pos}} = grep { $_ gt $repohash{$pkg}{latest} } @{$repohash{$pkg}{$pos}}; |
128 |
delete $repohash{$pkg}{$pos}; |
delete $repohash{$pkg}{$pos}; |
129 |
} |
} |
130 |
} else { |
} elsif ( ref($repohash{$pkg}{$pos}) eq 'ARRAY' ) { |
131 |
my ($latest, @rest) = sort { $b cmp $a } @{$repohash{$pkg}{$pos}}; |
my ($latest, @rest) = sort { $b cmp $a } @{$repohash{$pkg}{$pos}}; |
132 |
delete $repohash{$pkg}{$pos}; |
delete $repohash{$pkg}{$pos}; |
133 |
if ( $repohash{$pkg}{latest} && $repohash{$pkg}{latest} ge $latest ) { |
if ( $repohash{$pkg}{latest} && $repohash{$pkg}{latest} ge $latest ) { |
193 |
push @sources, $src if ($src =~ s/\.el\d\.at\./\.at\./); |
push @sources, $src if ($src =~ s/\.el\d\.at\./\.at\./); |
194 |
push @sources, $src if ($src =~ s/\.fc\d\.at\./\.at\./); |
push @sources, $src if ($src =~ s/\.fc\d\.at\./\.at\./); |
195 |
push @sources, $src if ($src =~ s/\.rf\./\.dag\./); |
push @sources, $src if ($src =~ s/\.rf\./\.dag\./); |
196 |
|
push @sources, $src if ($src =~ s/\.0\.el\d+\./\.at\./); |
197 |
|
push @sources, $src if ($src =~ s/\.el\d+\./\.at\./); |
198 |
|
|
199 |
|
|
200 |
my $found = 0; |
my $found = 0; |
201 |
foreach my $source ( @sources ) { |
foreach my $source ( @sources ) { |
243 |
foreach my $repo ( sort keys %changed ) { |
foreach my $repo ( sort keys %changed ) { |
244 |
next if $repo =~ m{^$stagedir}; |
next if $repo =~ m{^$stagedir}; |
245 |
|
|
246 |
print "rebuilding $repo/$arch...\n"; |
my $dir=`readlink -f $repo/$arch`; |
247 |
system(qw(createrepo), "$repo/$arch"); |
chomp $dir; |
248 |
system(qw(repoview), "$repo/$arch"); |
print "rebuilding $dir...\n"; |
249 |
|
system(qw(createrepo), "$dir"); |
250 |
|
system(qw(repoview), "$dir"); |
251 |
} |
} |
252 |
|
|