aboutsummaryrefslogtreecommitdiffstats
path: root/gendistrib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-11-10 10:21:44 +0000
committerOlivier Blin <oblin@mandriva.com>2009-11-10 10:21:44 +0000
commitb64ba24582c81f8a18c6878d99a921e08264fef9 (patch)
tree959b809c2f384bbe22c76cee4b009d3666315873 /gendistrib
parent647d31193a09851c68af7d545ae11515341bc414 (diff)
downloadrpmtools-b64ba24582c81f8a18c6878d99a921e08264fef9.tar
rpmtools-b64ba24582c81f8a18c6878d99a921e08264fef9.tar.gz
rpmtools-b64ba24582c81f8a18c6878d99a921e08264fef9.tar.bz2
rpmtools-b64ba24582c81f8a18c6878d99a921e08264fef9.tar.xz
rpmtools-b64ba24582c81f8a18c6878d99a921e08264fef9.zip
add --clean option
Diffstat (limited to 'gendistrib')
-rwxr-xr-xgendistrib8
1 files changed, 7 insertions, 1 deletions
diff --git a/gendistrib b/gendistrib
index 5ac65ed..a480f62 100755
--- a/gendistrib
+++ b/gendistrib
@@ -17,6 +17,7 @@ my %old;
GetOptions(
'blind' => \my $blind,
+ 'clean' => \my $clean,
'hdlists=s' => \$urpmfiles{hdlists},
'help|h' => \&usage,
'mediacfg=s' => \$urpmfiles{mediacfg},
@@ -104,7 +105,7 @@ foreach my $m ($distrib->listmedia) {
hdlist => "$path/media_info/hdlist.cz",
synthesis => "$path/media_info/synthesis.hdlist" . $distrib->getvalue($m, 'synthesis-suffix'),
pubkey => "$path/media_info/pubkey",
- noneedrebuild => $blind ? 0 : $distrib->check_index_sync($m, 'formedia'),
+ noneedrebuild => $blind || $clean ? 0 : $distrib->check_index_sync($m, 'formedia'),
};
}
@@ -145,6 +146,7 @@ foreach my $e (grep { !$_->{noneedrebuild} } @hdlists) {
my $options = join(' ',
'--allow-empty-media',
$nooutput ? '--quiet' : (),
+ $clean ? '--clean' : (),
$nobadrpm ? '--no-bad-rpm' : (),
$nomd5sum ? "--no-md5sum" : (),
$distrib->getvalue($e->{media}, 'xml-info') ? '--xml-info' : (),
@@ -276,6 +278,10 @@ gendistrib - generates a mirror tree for a distribution
Always rebuild indexes, without checking whether it's needed.
+=item --clean
+
+Force rebuild of indexes from scratch.
+
=item --hdlists file
Path of the F<hdlists> file (defaults to F<media/media_info/hdlists>). This is