210 |
foreach my $repo ( sort keys %copy ) { |
foreach my $repo ( sort keys %copy ) { |
211 |
foreach my $rpm ( keys %{{ map { $_ => 1 } @{$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 |
} |
} |
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"); |
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"); |
system(qw(rm -rf), "$dir/.repodata") if "$dir/.repodata"; |
233 |
} |
} |