17 |
my $stagedir = '/builds'; |
my $stagedir = '/builds'; |
18 |
my $arch = `uname -i`; |
my $arch = `uname -i`; |
19 |
chomp $arch; |
chomp $arch; |
20 |
|
#$arch = 'x86_64'; |
21 |
|
|
22 |
my @repos = ( |
my @repos = ( |
|
"$releasedir/$smerel/smeos/$arch/CentOS/RPMS", |
|
|
"$releasedir/$smerel/smeos/$arch/SME/RPMS", |
|
|
"$releasedir/$smerel/smeos/$arch/RPMS", |
|
23 |
"$releasedir/$smerel/smeos/$arch/SME", |
"$releasedir/$smerel/smeos/$arch/SME", |
24 |
|
"$releasedir/$smerel/smeos/$arch/SME/RPMS", |
25 |
|
"$releasedir/$smerel/smeos/$arch/CentOS/RPMS", |
26 |
"$releasedir/$smerel/smeupdates/$arch/RPMS", |
"$releasedir/$smerel/smeupdates/$arch/RPMS", |
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", |
34 |
"$builds/RPMS/i586", |
"$builds/RPMS/i586", |
35 |
"$builds/RPMS/i686", |
"$builds/RPMS/i686", |
36 |
"$builds/RPMS/noarch", |
"$builds/RPMS/noarch", |
37 |
"$stagedir/RPMS", |
"$stagedir/RPMS-$arch", |
38 |
); |
); |
39 |
|
@repos = grep { ! m{/i[56]86$} } @repos if $arch eq 'x86_64'; |
40 |
|
|
41 |
my @srcrepos = ( |
my @srcrepos = ( |
42 |
"/mirrors/centos/$centosrel/fasttrack/SRPMS", |
"/mirrors/centos/$centosrel/fasttrack/SRPMS", |
45 |
"/mirrors/centos/$centosrel/extras/SRPMS", |
"/mirrors/centos/$centosrel/extras/SRPMS", |
46 |
"/mirrors/rpmforge/dag/source", |
"/mirrors/rpmforge/dag/source", |
47 |
"/mirrors/atrpms/src/el$centosrel-$arch/atrpms/stable", |
"/mirrors/atrpms/src/el$centosrel-$arch/atrpms/stable", |
48 |
|
"/mirrors/atrpms/src/el$centosrel-$arch/atrpms/testing", |
49 |
"/mirrors/fedora/epel/$centosrel/SRPMS", |
"/mirrors/fedora/epel/$centosrel/SRPMS", |
50 |
|
"/mirrors/fedora/epel/testing/$centosrel/SRPMS", |
51 |
"/mirrors/fedora/core/updates/$fedorarel/SRPMS", |
"/mirrors/fedora/core/updates/$fedorarel/SRPMS", |
52 |
"/mirrors/fedora/core/$fedorarel/source/SRPMS", |
"/mirrors/fedora/core/$fedorarel/source/SRPMS", |
53 |
"/mirrors/fedora/extras/$fedorarel/SRPMS", |
"/mirrors/fedora/extras/$fedorarel/SRPMS", |
54 |
"$builds/SRPMS", |
"$builds/SRPMS", |
55 |
); |
); |
56 |
|
|
|
my %repohash; |
|
|
my %srcrepohash; |
|
|
my %changed; |
|
|
my %copy; |
|
|
my @remove; |
|
|
|
|
57 |
my $rpm_flags = RPM2->vsf_nodsaheader | RPM2->vsf_nodsa; |
my $rpm_flags = RPM2->vsf_nodsaheader | RPM2->vsf_nodsa; |
58 |
|
|
59 |
%{$srcrepohash{$stagedir}} = map { $_ => 0 } grep { /\.rpm$/ } readdir SRPMS if ( opendir SRPMS, "$stagedir/SRPMS" ); |
my @rpms; |
60 |
closedir SRPMS; |
my %srpms; |
61 |
|
my %sources; |
62 |
|
my %changed; |
63 |
|
my %copy; |
64 |
|
|
65 |
|
print "\nReading repos...\n"; |
66 |
foreach my $repo ( @repos ) { |
foreach my $repo ( @repos ) { |
67 |
if ( $repo =~ m{^($releasedir/$smerel/sme[^/]*)/} ) { |
my $r = $repo; |
68 |
my $srcrepo = $1; |
if ( $repo =~ m{$stagedir/RPMS} ) { |
69 |
|
$r = $stagedir; |
70 |
%{$srcrepohash{$srcrepo}} = map { $_ => 0 } grep { /\.rpm$/ } readdir SRPMS if ( opendir SRPMS, "$srcrepo/SRPMS" ); |
} elsif ( $repo =~ m{$builds/RPMS} ) { |
71 |
closedir SRPMS; |
$r = 'builds'; |
72 |
} |
} elsif ( $repo =~ m{^($releasedir/$smerel/sme[^/]*)/} ) { |
73 |
|
$r = $1; |
74 |
opendir RPMS, $repo; |
} |
75 |
foreach my $rpm ( grep { m{\.rpm} } readdir RPMS ) { |
|
76 |
my $header = RPM2->open_package("$repo/$rpm", $rpm_flags); |
if ( $r eq $stagedir ) { |
77 |
my $pkg = $header->tag("NAME").".".$header->tag("ARCH"); |
opendir SRPMS, "$r/SRPMS-$arch" or next; |
78 |
if ( $repo =~ m{$stagedir/RPMS} ) { |
foreach my $srpm ( grep { /\.rpm$/ } readdir SRPMS ) { |
79 |
push @{$repohash{$pkg}{$stagedir}}, $header; |
$srpms{$r}{$srpm} = 0; |
80 |
} elsif ( $repo =~ m{$builds/RPMS} ) { |
$sources{$srpm} = "$r/SRPMS-$arch"; |
81 |
push @{$repohash{$pkg}{builds}}, $header; |
} |
82 |
} elsif ( $repo =~ m{^($releasedir/$smerel/sme[^/]*)/} ) { |
closedir SRPMS; |
83 |
my $pos = $1; |
} elsif ( $r ne 'builds' ) { |
84 |
push @{$repohash{$pkg}{$pos}}, $header; |
opendir SRPMS, "$r/SRPMS" or next; |
85 |
} |
foreach my $srpm ( grep { /\.rpm$/ } readdir SRPMS ) { |
86 |
} |
$srpms{$r}{$srpm} = 0; |
87 |
closedir RPMS; |
$sources{$srpm} = "$r/SRPMS"; |
88 |
|
} |
89 |
|
closedir SRPMS; |
90 |
|
} |
91 |
|
|
92 |
|
opendir RPMS, $repo or next; |
93 |
|
print " - $repo\n"; |
94 |
|
foreach my $pkg ( reverse sort map { RPM2->open_package("$repo/$_", $rpm_flags); } grep { /\.rpm$/ } readdir RPMS ) { |
95 |
|
my $rpm = { name => $pkg->tag("NAME"), |
96 |
|
filename => join("-", map { $pkg->tag($_) } qw/name version release/) . "." . $pkg->tag("ARCH"), |
97 |
|
version => $pkg->tag("VERSION"), |
98 |
|
release => $pkg->tag("RELEASE"), |
99 |
|
repo => $r, |
100 |
|
rpm => $pkg, |
101 |
|
}; |
102 |
|
my $source = $pkg->tag("SOURCERPM"); |
103 |
|
$source =~ s#-$rpm->{version}-$rpm->{release}.*##; |
104 |
|
$rpm->{source} = $source; |
105 |
|
|
106 |
|
if ( $rpm->{repo} =~ m{^$releasedir/$smerel/} && $rpm->{repo} !~ m{/smedev$} ) { |
107 |
|
$rpm->{repo} = 'deleted' if grep { $_->{repo} ne $rpm->{repo} && $_->{name} eq $rpm->{name} && $_->{rpm} ge $rpm->{rpm} } @rpms; |
108 |
|
$rpm->{repo} = 'deleted' if grep { $_->{repo} eq $rpm->{repo} && $_->{name} eq $rpm->{name} && $_->{rpm} gt $rpm->{rpm} } @rpms; |
109 |
|
$changed{$r}++ if $rpm->{repo} eq 'deleted'; |
110 |
|
} |
111 |
|
|
112 |
|
push @rpms, $rpm; |
113 |
|
} |
114 |
|
closedir RPMS; |
115 |
} |
} |
116 |
|
|
117 |
my %sources; |
print "\nReading source repos...\n"; |
118 |
foreach my $repo ( reverse @srcrepos ) { |
foreach my $repo ( reverse @srcrepos ) { |
119 |
my %temp_repo = map { $_ => $repo } grep { /\.rpm$/ } readdir SRPMS if ( opendir SRPMS, $repo ); |
my %temp_repo = map { $_ => $repo } grep { /\.rpm$/ } readdir SRPMS if ( opendir SRPMS, $repo ); |
120 |
closedir SRPMS; |
closedir SRPMS; |
122 |
%sources = (%sources, %temp_repo); |
%sources = (%sources, %temp_repo); |
123 |
} |
} |
124 |
|
|
125 |
foreach my $pkg ( keys %repohash ) { |
print "\nFinding latest packages...\n"; |
126 |
foreach my $repo ( @repos ) { |
my @latest; |
127 |
if ( $repo =~ m{$stagedir/RPMS} ) { |
foreach my $rpm ( reverse grep { $_->{repo} =~ m{^$releasedir/$smerel/} && $_->{repo} !~ m{/sme(addons|contribs|dev|extras)$} } @rpms ) { |
128 |
next unless $repohash{$pkg}; |
unless ( grep { $_->{name} eq $rpm->{name} && $_->{rpm} gt $rpm->{rpm} } @latest ) { |
129 |
if ( $repohash{$pkg}{$stagedir} ) { |
push @latest, $rpm; |
130 |
my ($latest, @rest) = sort { $b cmp $a } @{$repohash{$pkg}{$stagedir}}; |
unless ( grep { $_->{repo} eq $stagedir && $_->{filename} eq $rpm->{filename} } @rpms ) { |
131 |
delete $repohash{$pkg}{$stagedir}; |
push @{$copy{"$stagedir/RPMS-$arch"}}, $rpm->{rpm}->filename; |
132 |
push @remove, map { $_->filename } @rest if @rest; |
push @rpms, { name => $rpm->{name}, |
133 |
if ( $repohash{$pkg}{latest} ) { |
filename => $rpm->{filename}, |
134 |
if ($repohash{$pkg}{latest} ne $latest ) { |
version => $rpm->{version}, |
135 |
push @remove, $latest->filename; |
release => $rpm->{release}, |
136 |
push @{$copy{"$stagedir/RPMS"}}, $repohash{$pkg}{latest}->filename; |
repo => $stagedir, |
137 |
$repohash{$pkg}{$stagedir} = $repohash{$pkg}{latest}; |
rpm => $rpm->{rpm}, |
138 |
} else { |
source => $rpm->{source} |
139 |
$repohash{$pkg}{$stagedir} = $latest; |
}; |
140 |
} |
} |
141 |
} else { |
} |
142 |
push @remove, $latest->filename; |
} |
143 |
} |
|
144 |
} elsif ( $repohash{$pkg}{latest} ) { |
foreach my $rpm ( grep { $_->{repo} eq $stagedir } @rpms ) { |
145 |
push @{$copy{"$stagedir/RPMS"}}, $repohash{$pkg}{latest}->filename; |
$rpm->{repo} = 'deleted' unless grep { $_->{filename} eq $rpm->{filename} } @latest; |
146 |
$repohash{$pkg}{$stagedir} = $repohash{$pkg}{latest}; |
} |
147 |
} |
|
148 |
} elsif ( $repo =~ m{^($releasedir/$smerel/sme[^/]*)/} ) { |
foreach my $rpm ( reverse grep { $_->{repo} =~ m{^$releasedir/$smerel/} && $_->{repo} =~ m{/sme(addons|contribs|extras)$} } @rpms ) { |
149 |
my $pos = $1; |
unless ( grep { $_->{name} eq $rpm->{name} && $_->{rpm} gt $rpm->{rpm} } @latest ) { |
150 |
next unless $repohash{$pkg}{$pos}; |
push @latest, $rpm; |
151 |
if ( $pos =~ m{/smedev$} ) { |
} |
152 |
next unless $repohash{$pkg}{latest}; |
} |
153 |
my @rest = grep { $_ le $repohash{$pkg}{latest} } @{$repohash{$pkg}{$pos}}; |
|
154 |
if ( @rest ) { |
print "\nFinding development packages...\n"; |
155 |
push @remove, map { $_->filename } @rest; |
my @devel; |
156 |
$changed{$pos}++; |
my %versions; |
157 |
@{$repohash{$pkg}{$pos}} = grep { $_ gt $repohash{$pkg}{latest} } @{$repohash{$pkg}{$pos}}; |
foreach my $rpm ( grep { $_->{repo} eq 'builds' } @rpms ) { |
158 |
delete $repohash{$pkg}{$pos}; |
next if grep { $_->{name} eq $rpm->{name} && $_->{rpm} ge $rpm->{rpm} } @latest; |
159 |
} |
|
160 |
} elsif ( ref($repohash{$pkg}{$pos}) eq 'ARRAY' ) { |
$versions{$rpm->{name}}{$rpm->{version}}++ unless grep { $_->{name} eq $rpm->{name} && $_->{rpm} eq $rpm->{rpm} } @devel; |
161 |
my ($latest, @rest) = sort { $b cmp $a } @{$repohash{$pkg}{$pos}}; |
next if $versions{$rpm->{name}}{$rpm->{version}} > $releases || scalar keys %{$versions{$rpm->{name}}} > $releases; |
162 |
delete $repohash{$pkg}{$pos}; |
print "Possible update " . $rpm->{rpm}->filename . "\n" if grep { $_->{name} eq $rpm->{name} } @latest; |
163 |
if ( $repohash{$pkg}{latest} && $repohash{$pkg}{latest} ge $latest ) { |
|
164 |
push @rest, $latest; |
push @devel, $rpm; |
165 |
} else { |
unless ( grep { $_->{repo} =~ m{/smedev$} && $_->{filename} eq $rpm->{filename} } @rpms ) { |
166 |
$repohash{$pkg}{latest} = $latest; |
push @{$copy{"$releasedir/$smerel/smedev/$arch/RPMS"}}, $rpm->{rpm}->filename; |
167 |
$repohash{$pkg}{$pos} = $latest; |
$changed{"$releasedir/$smerel/smedev"}++; |
168 |
} |
push @rpms, { name => $rpm->{name}, |
169 |
if ( @rest ) { |
filename => $rpm->{filename}, |
170 |
push @remove, map { $_->filename } @rest; |
version => $rpm->{version}, |
171 |
$changed{$pos}++; |
release => $rpm->{release}, |
172 |
} |
repo => "$releasedir/$smerel/smedev", |
173 |
} |
rpm => $rpm->{rpm}, |
174 |
} |
source => $rpm->{source} |
175 |
} |
}; |
176 |
} |
} |
177 |
|
} |
178 |
print "\n"; |
|
179 |
foreach my $pkg ( sort grep { $repohash{$_}{builds} } keys %repohash ) { |
foreach my $rpm ( grep { $_->{repo} =~ m{/smedev$} } @rpms ) { |
180 |
my %versions = (); |
$rpm->{repo} = 'deleted' unless grep { $_->{filename} eq $rpm->{filename} } @devel; |
181 |
foreach my $ver ( sort { $b cmp $a } @{$repohash{$pkg}{builds}} ) { |
} |
182 |
next if $repohash{$pkg}{latest} && $repohash{$pkg}{latest} ge $ver; |
|
183 |
|
print "\nFinding source packages...\n"; |
184 |
$versions{$ver->tag("VERSION")}++; |
foreach my $rpm ( grep { $_->{repo} !~ m{^(builds|deleted)$} } @rpms ) { |
185 |
if ( $versions{$ver->tag("VERSION")} > $releases || (scalar keys %versions) > $releases ) { |
my $src; |
186 |
foreach my $rpm ( grep { $ver eq $_ } @{$repohash{$pkg}{"$releasedir/$smerel/smedev"}} ) { |
my $srpm = $rpm->{rpm}->tag("SOURCERPM"); |
187 |
push @remove, $rpm->filename; |
|
188 |
@{$repohash{$pkg}{"$releasedir/$smerel/smedev"}} = grep { $rpm ne $_ } @{$repohash{$pkg}{"$releasedir/$smerel/smedev"}}; |
my @sources = (); |
189 |
$changed{"$releasedir/$smerel/smedev"}++; |
push @sources, ($src = $srpm); |
190 |
} |
push @sources, $src if (($src = $srpm) =~ s/\.el\d\.rf\./\.rf\./); |
191 |
} else { |
push @sources, $src if (($src = $srpm) =~ s/\.[0-3]\.el\d+\.rf\./\.rf\./); |
192 |
print "Possible update " . $ver->filename . "\n" if $repohash{$pkg}{latest}; |
push @sources, $src if (($src = $srpm) =~ s/\.(el|fc)\d\.at//); |
193 |
if ( ! grep { $ver eq $_ } @{$repohash{$pkg}{"$releasedir/$smerel/smedev"}} ) { |
push @sources, $src if (($src = $srpm) =~ s/\.at//); |
194 |
push @{$copy{"$releasedir/$smerel/smedev/$arch/RPMS"}}, $ver->filename; |
push @sources, $src if (($src = $srpm) =~ s/\.(el|fc)\d//); |
195 |
push @{$repohash{$pkg}{"$releasedir/$smerel/smedev"}}, $ver; |
push @sources, $src if (($src = $srpm) =~ s/\.\d+\.(el|fc)\d//); |
196 |
$changed{"$releasedir/$smerel/smedev"}++; |
|
197 |
} |
my $found = 0; |
198 |
} |
my $repo = $rpm->{repo}; |
199 |
} |
foreach my $source ( @sources ) { |
200 |
} |
if ( $sources{$source} ) { |
201 |
|
if ($repo eq $stagedir) { |
202 |
foreach my $pkg ( grep { $repohash{$_}{"$releasedir/$smerel/smedev"} } keys %repohash ) { |
push @{$copy{"$repo/SRPMS-$arch"}}, "$sources{$source}/$source" unless -f "$repo/SRPMS-$arch/$source"; |
203 |
foreach my $rpm ( @{$repohash{$pkg}{"$releasedir/$smerel/smedev"}} ) { |
} else { |
204 |
unless ( grep { $rpm eq $_ } @{$repohash{$pkg}{builds}} ) { |
unless ( -f "$repo/SRPMS/$source" ) { |
205 |
push @remove, $rpm->filename; |
push @{$copy{"$repo/SRPMS"}}, "$sources{$source}/$source"; |
206 |
@{$repohash{$pkg}{"$releasedir/$smerel/smedev"}} = grep { $rpm ne $_ } @{$repohash{$pkg}{"$releasedir/$smerel/smedev"}}; |
$changed{$repo}++; |
207 |
$changed{"$releasedir/$smerel/smedev"}++; |
} |
208 |
} |
} |
209 |
} |
$srpms{$repo}{$source}++; |
210 |
|
$found++; |
211 |
|
last; |
212 |
|
} |
213 |
|
} |
214 |
|
print "Can't find source for ".$rpm->{rpm}->filename."\n" unless $found; |
215 |
} |
} |
216 |
|
|
217 |
print "\n"; |
my @remove; |
218 |
foreach my $repo ( sort keys %srcrepohash ) { |
foreach my $repo ( keys %srpms ) { |
219 |
foreach my $pkg ( sort grep { $repohash{$_}{$repo} } keys %repohash ) { |
foreach my $rpm ( keys %{$srpms{$repo}} ) { |
220 |
my @rpms = ref($repohash{$pkg}{$repo}) eq "ARRAY" ? @{$repohash{$pkg}{$repo}} : ($repohash{$pkg}{$repo}); |
unless ( $srpms{$repo}{$rpm} ) { |
221 |
foreach my $rpm ( sort @rpms ) { |
if ($repo eq $stagedir) { |
222 |
my $src; |
push @remove, "$repo/SRPMS-$arch/$rpm"; |
223 |
|
} else { |
224 |
my @sources = (); |
push @remove, "$repo/SRPMS/$rpm"; |
225 |
push @sources, ($src = $rpm->tag("SOURCERPM")); |
$changed{$repo}++; |
226 |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.el\d\.rf\./\.rf\./); |
} |
227 |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.[0-3]\.el\d+\.rf\./\.rf\./); |
} |
228 |
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.(el|fc)\d\.at//); |
} |
|
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.at//); |
|
|
push @sources, $src if (($src = $rpm->tag("SOURCERPM")) =~ s/\.(el|fc)\d//); |
|
|
$src = $rpm->tag("SOURCERPM"); |
|
|
|
|
|
my $found = 0; |
|
|
foreach my $source ( @sources ) { |
|
|
if ( $sources{$source} ) { |
|
|
unless ( -f "$repo/SRPMS/$source" ) { |
|
|
push @{$copy{"$repo/SRPMS"}}, "$sources{$source}/$source"; |
|
|
$changed{$repo}++; |
|
|
} |
|
|
$srcrepohash{$repo}{$source}++; |
|
|
$found++; |
|
|
last; |
|
|
} elsif ( -f "$repo/SRPMS/$source" ) { |
|
|
print "Found missing source $repo/SRPMS/$source for ".$rpm->as_nvre()."\n"; |
|
|
$srcrepohash{$repo}{$source}++; |
|
|
$found++; |
|
|
} |
|
|
} |
|
|
print "Can't find source for ".$rpm->as_nvre()."\n" unless $found; |
|
|
} |
|
|
} |
|
|
|
|
|
foreach my $rpm ( keys %{$srcrepohash{$repo}} ) { |
|
|
unless ( $srcrepohash{$repo}{$rpm} ) { |
|
|
push @remove, "$repo/SRPMS/$rpm"; |
|
|
$changed{$repo}++; |
|
|
} |
|
|
} |
|
229 |
} |
} |
230 |
|
|
231 |
print "\n"; |
print "\n"; |
232 |
foreach my $repo ( sort keys %copy ) { |
foreach my $repo ( sort keys %copy ) { |
233 |
foreach my $rpm ( sort keys %{{ map { $_ => 1 } @{$copy{$repo}} }} ) { |
foreach my $rpm ( keys %{{ map { $_ => 1 } @{$copy{$repo}} }} ) { |
234 |
print "copying $rpm to $repo/\n"; |
print "copying $rpm to $repo/\n"; |
235 |
|
mkdir "$repo" unless -d "$repo"; |
236 |
system(qw(cp --preserve=timestamps), $rpm, "$repo/"); |
system(qw(cp --preserve=timestamps), $rpm, "$repo/"); |
237 |
} |
} |
238 |
} |
} |
239 |
|
|
240 |
print "\n"; |
print "\n"; |
241 |
foreach my $rpm ( sort keys %{{ map { $_ => 1 } @remove }} ) { |
foreach my $rpm ( keys %{{ map { $_ => 1 } (@remove, map { $_->{rpm}->filename } grep { $_->{repo} eq 'deleted' } @rpms) }} ) { |
242 |
print "removing $rpm\n"; |
print "removing $rpm\n"; |
243 |
unlink $rpm; |
unlink $rpm; |
244 |
} |
} |
245 |
|
|
246 |
print "\n"; |
print "\n"; |
247 |
foreach my $repo ( sort keys %changed ) { |
foreach my $repo ( sort keys %changed ) { |
|
next if $repo =~ m{^$stagedir}; |
|
|
|
|
248 |
my $dir=`readlink -f $repo/$arch`; |
my $dir=`readlink -f $repo/$arch`; |
249 |
chomp $dir; |
chomp $dir; |
250 |
print "rebuilding $dir...\n"; |
print "rebuilding $dir...\n"; |
251 |
system(qw(createrepo), "$dir"); |
system(qw(createrepo), "$dir"); |
252 |
|
system(qw(rm -rf), "$dir/.olddata") if -d "$dir/.olddata"; |
253 |
system(qw(repoview), "$dir"); |
system(qw(repoview), "$dir"); |
254 |
|
system(qw(rm -rf), "$dir/.repodata") if "$dir/.repodata"; |
255 |
} |
} |
|
|
|