summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--urpm.pm6
-rw-r--r--urpm/main_loop.pm5
3 files changed, 13 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 4f5033e4..a0277566 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@
o fix displaying error message when failing to lock (regression in 5.1)
- urpmi:
o --install-src as user now works for remote medium
+ o --install-src will succesfully installed src.rpm from
+ /var/cache/urpmi/rpms/* (unless post-clean is 0)
- urpmf:
o add special code for --files simple case, it makes urpmf 3x faster for
this often used case
diff --git a/urpm.pm b/urpm.pm
index f89e819e..8f833094 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -113,6 +113,12 @@ sub userdir {
$dir;
}
+sub is_temporary_file {
+ my ($urpm, $f) = @_;
+
+ begins_with($f, $urpm->{cachedir});
+}
+
sub set_files {
my ($urpm, $urpmi_root) = @_;
my %h = (
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index c99ce474..6491dab0 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -124,6 +124,11 @@ foreach my $set (@{$state->{transaction} || []}) {
if ($?) {
print N("Installation failed"), "\n";
++$nok;
+ } elsif ($urpm->{options}{'post-clean'}) {
+ if (my @tmp_srpm = grep { urpm::is_temporary_file($urpm, $_) } @l) {
+ $urpm->{log}(N("removing installed rpms (%s)", join(' ', @tmp_srpm)));
+ unlink @tmp_srpm;
+ }
}
}
next;