summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--pod/urpmi.addmedia.8.pod4
-rw-r--r--pod/urpmi.removemedia.8.pod4
-rw-r--r--pod/urpmi.update.8.pod4
-rw-r--r--urpm.pm21
-rw-r--r--urpm/args.pm6
-rw-r--r--urpm/media.pm6
-rwxr-xr-xurpmi1
-rwxr-xr-xurpmi.addmedia1
-rwxr-xr-xurpmi.removemedia6
-rwxr-xr-xurpmi.update1
11 files changed, 5 insertions, 51 deletions
diff --git a/NEWS b/NEWS
index ed58f5c3..0a7984a6 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@
o replace /var/lib/urpmi/MD5SUM with /var/lib/urpmi/MD5SUM.<medium_name>
(this will allow checking xml media_info is up-to-date even if we don't
update it at the same time as synthesis is updated)
+- urpmi.update, urpmi.addmedia, urpmi.removemedia:
+ o drop option "-c" which used to clean /var/cache/urpmi/headers
- urpmi:
o do remove __db* on priority-upgrade
(fix regression introduced in 4.10.15)
diff --git a/pod/urpmi.addmedia.8.pod b/pod/urpmi.addmedia.8.pod
index c23867d1..07a7ae00 100644
--- a/pod/urpmi.addmedia.8.pod
+++ b/pod/urpmi.addmedia.8.pod
@@ -179,10 +179,6 @@ with C<urpmi.update>; it's ignored until then.
Don't import pubkey of added media.
-=item B<-c>
-
-Clean headers cache directory in F</var/cache/urpmi/headers>.
-
=back
=head1 Variables
diff --git a/pod/urpmi.removemedia.8.pod b/pod/urpmi.removemedia.8.pod
index d77cba78..6a5fd670 100644
--- a/pod/urpmi.removemedia.8.pod
+++ b/pod/urpmi.removemedia.8.pod
@@ -20,10 +20,6 @@ names you first told to urpmi.addmedia.
Select and remove all media.
-=item B<-c>
-
-Clean header cache directory (F</var/cache/urpmi/headers>).
-
=item B<-y>
Fuzzy match on media names, so you can remove several media at once.
diff --git a/pod/urpmi.update.8.pod b/pod/urpmi.update.8.pod
index 5adfde88..b4939d6b 100644
--- a/pod/urpmi.update.8.pod
+++ b/pod/urpmi.update.8.pod
@@ -82,10 +82,6 @@ Note that the rsync options will also be used for ssh media.
Select all media that are not using a removable device to update them.
-=item B<-c>
-
-Clean F</var/cache/urpmi/headers> directory on exit.
-
=item B<-f>
Force updating synthesis
diff --git a/urpm.pm b/urpm.pm
index 5cd79dcd..d2d0c1bb 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -181,27 +181,6 @@ sub db_open_or_die {
$db;
}
-sub remove_obsolete_headers_in_cache {
- my ($urpm) = @_;
- my %headers;
- if (my $dh = urpm::sys::opendir_safe($urpm, "$urpm->{cachedir}/headers")) {
- local $_;
- while (defined($_ = readdir $dh)) {
- m|^([^/]*-[^-]*-[^-]*\.[^\.]*)(?::\S*)?$| and $headers{$1} = $_;
- }
- }
- if (%headers) {
- my $previous_total = scalar(keys %headers);
- foreach (@{$urpm->{depslist}}) {
- delete $headers{$_->fullname};
- }
- $urpm->{log}(N("found %d rpm headers in cache, removing %d obsolete headers", $previous_total, scalar(keys %headers)));
- foreach (values %headers) {
- unlink "$urpm->{cachedir}/headers/$_";
- }
- }
-}
-
#- register local packages for being installed, keep track of source.
sub register_rpms {
my ($urpm, @files) = @_;
diff --git a/urpm/args.pm b/urpm/args.pm
index 5b5f9920..6e281473 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -283,7 +283,7 @@ my %options_spec = (
'urpmi.update' => {
a => \$options{all},
- c => sub { $options{noclean} = 0 },
+ c => sub {}, # obsolete
f => sub { ++$options{force}; $options{probe_with} = 'rpms' if $options{force} == 2 },
z => sub { ++$options{compress} },
update => \$options{update},
@@ -380,14 +380,14 @@ foreach my $k ("help|h", "version", "wget", "curl", "prozilla", "aria2", "proxy=
$options_spec{urpmq}{$k} = $options_spec{urpmi}{$k};
}
-foreach my $k ("help|h", "wget", "curl", "prozilla", "aria2", "proxy=s", "proxy-user=s", "c", "f", "z",
+foreach my $k ("help|h", "wget", "curl", "prozilla", "aria2", "proxy=s", "proxy-user=s", "f", "z",
"limit-rate=s", "no-md5sum", "update", "norebuild!", "probe-rpms",
"wget-options=s", "curl-options=s", "rsync-options=s", "prozilla-options=s", "aria2-options=s", '<>')
{
$options_spec{'urpmi.addmedia'}{$k} = $options_spec{'urpmi.update'}{$k};
}
-foreach my $k ("a", "c", '<>') {
+foreach my $k ("a", '<>') {
$options_spec{'urpmi.removemedia'}{$k} = $options_spec{'urpmi.update'}{$k};
}
foreach my $k ("y") {
diff --git a/urpm/media.pm b/urpm/media.pm
index 20d34b64..5a848a4e 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1357,7 +1357,6 @@ sub _update_media__handle_some_flags {
#- callback : UI callback
#- forcekey : force retrieval of pubkey
#- force : try to force rebuilding base files
-#- noclean : keep old files in the header cache directory
#- nomd5sum : don't verify MD5SUM of retrieved files
#- nopubkey : don't use rpm pubkeys
#- probe_with : probe synthesis or rpms
@@ -1392,11 +1391,6 @@ sub update_media {
}
if ($urpm->{modified}) {
- if ($options{noclean}) {
- #- clean headers cache directory to remove everything that is no longer
- #- useful according to the depslist.
- urpm::remove_obsolete_headers_in_cache($urpm);
- }
#- write config files in any case
write_config($urpm);
urpm::download::dump_proxy_config();
diff --git a/urpmi b/urpmi
index fe1b2d6f..eb8f3d4f 100755
--- a/urpmi
+++ b/urpmi
@@ -359,7 +359,6 @@ if ($auto_update && !$bug && !$env) {
urpm::media::update_media($urpm,
all => 1,
callback => \&urpm::download::sync_logger,
- noclean => $noclean,
quiet => $options{verbose} < 0,
nomd5sum => $nomd5sum,
forcekey => $forcekey,
diff --git a/urpmi.addmedia b/urpmi.addmedia
index fc46d9da..ba131e6b 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -85,7 +85,6 @@ if ($options{mirrors_url}) {
urpm::cfg::mirrors_cfg();
}
$options{force} = 0;
-$options{noclean} = 1;
my $urpm = urpm->new_parse_cmdline or usage();
our ($name, $url, $with, $relative_synthesis) = our @cmdline;
diff --git a/urpmi.removemedia b/urpmi.removemedia
index 35f98081..b9541e6b 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -50,7 +50,6 @@ where <name> is a medium name to remove.
#- default option values
-$options{noclean} = 1;
$options{strict_match} = 1;
our @cmdline; #- set by urpm::args
@@ -84,11 +83,6 @@ my @selected = urpm::media::select_media_by_name($urpm, \@toremove, !$urpm->{opt
or exit 1;
urpm::media::remove_media($urpm, \@selected);
-
-if ($options{noclean}) {
- #- FIXME: AFAIK it is broken because function below use {depslist} which we don't clean here
- urpm::remove_obsolete_headers_in_cache($urpm);
-}
urpm::media::write_urpmi_cfg($urpm);
exit(0);
diff --git a/urpmi.update b/urpmi.update
index 29beade8..894516a6 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -61,7 +61,6 @@ delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
our @cmdline; #- set by urpm::args
$options{force} = 0;
-$options{noclean} = 1;
my $urpm = urpm->new_parse_cmdline or exit(1);