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", |
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 ) { |
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 ) { |
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") if -d "$dir/.olddata"; |
231 |
system(qw(repoview), "$dir"); |
system(qw(repoview), "$dir"); |
232 |
|
system(qw(rm -rf), "$dir/.repodata") if "$dir/.repodata"; |
233 |
} |
} |