11 |
|
|
12 |
my $releasedir = '/releases'; |
my $releasedir = '/releases'; |
13 |
my $smerel = '7'; |
my $smerel = '7'; |
|
my $arch = 'i386'; |
|
14 |
my $centosrel = '4'; |
my $centosrel = '4'; |
15 |
my $fedorarel = '3'; |
my $fedorarel = '3'; |
16 |
my $builds = '/builds/rpms'; |
my $builds = '/builds/rpms'; |
17 |
my $stagedir = '/builds'; |
my $stagedir = '/builds'; |
18 |
|
my $arch = `uname -i`; |
19 |
|
chomp $arch; |
20 |
|
|
21 |
my @repos = ( |
my @repos = ( |
22 |
"$releasedir/$smerel/smeos/$arch/CentOS/RPMS", |
"$releasedir/$smerel/smeos/$arch/CentOS/RPMS", |
185 |
foreach my $pkg ( sort grep { $repohash{$_}{$repo} } keys %repohash ) { |
foreach my $pkg ( sort grep { $repohash{$_}{$repo} } keys %repohash ) { |
186 |
my @rpms = ref($repohash{$pkg}{$repo}) eq "ARRAY" ? @{$repohash{$pkg}{$repo}} : ($repohash{$pkg}{$repo}); |
my @rpms = ref($repohash{$pkg}{$repo}) eq "ARRAY" ? @{$repohash{$pkg}{$repo}} : ($repohash{$pkg}{$repo}); |
187 |
foreach my $rpm ( sort @rpms ) { |
foreach my $rpm ( sort @rpms ) { |
188 |
my $src = $rpm->tag("SOURCERPM"); |
my $src; |
189 |
|
|
190 |
my @sources = (); |
my @sources = (); |
191 |
push @sources, $src; |
push @sources, ($src = $rpm->tag("SOURCERPM")); |
192 |
push @sources, $src if ($src =~ s/\.\d+\.el\d+\.rf\./\.rf\./); |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.el\d\.rf\./\.rf\./); |
193 |
push @sources, $src if ($src =~ s/\.el\d\.rf\./\.rf\./); |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.[0-3]\.el\d+\.rf\./\.rf\./); |
194 |
push @sources, $src if ($src =~ s/\.el\d\.at\./\.at\./); |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.(el|fc)\d\.at//); |
195 |
push @sources, $src if ($src =~ s/\.fc\d\.at\./\.at\./); |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.at//); |
196 |
push @sources, $src if ($src =~ s/\.rf\./\.dag\./); |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.(el|fc)\d//); |
197 |
|
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.\d+\.(el|fc)\d//); |
198 |
|
$src = $rpm->tag("SOURCERPM"); |
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 |
|
|