From b64ba24582c81f8a18c6878d99a921e08264fef9 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 10 Nov 2009 10:21:44 +0000 Subject: add --clean option --- gendistrib | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gendistrib') 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 file (defaults to F). This is -- cgit v1.2.1