diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-04-22 21:43:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-04-22 21:43:50 +0000 |
commit | 33db0379ffb8cf93e2fa96eda8913ea493d0dca4 (patch) | |
tree | 22fc7973eadbb54ded575d4af249324faba2ba94 | |
parent | f932caa45cf4fbcf8903ad4f6f5ba727a435777f (diff) | |
download | rpmdrake-33db0379ffb8cf93e2fa96eda8913ea493d0dca4.tar rpmdrake-33db0379ffb8cf93e2fa96eda8913ea493d0dca4.tar.gz rpmdrake-33db0379ffb8cf93e2fa96eda8913ea493d0dca4.tar.bz2 rpmdrake-33db0379ffb8cf93e2fa96eda8913ea493d0dca4.tar.xz rpmdrake-33db0379ffb8cf93e2fa96eda8913ea493d0dca4.zip |
make it slighly faster: do not perform useless I/O
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | Rpmdrake/rpmnew.pm | 3 |
2 files changed, 2 insertions, 2 deletions
@@ -1,6 +1,7 @@ - --merge-all-rpmnew mode: o consider all config files, not only those in /etc o ignore /etc/{passwd,group,(g)shadow,hosts,resolv.conf} (too dangerous) + o make it slighly faster: do not perform useless I/O Version 5.47 - 21 Apr 2013, Thierry Vignaud diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm index 9bf40891..70880a10 100644 --- a/Rpmdrake/rpmnew.pm +++ b/Rpmdrake/rpmnew.pm @@ -155,7 +155,6 @@ sub inspect { sub dialog_rpmnew { my ($msg, %p2r) = @_; - @{$p2r{$_}} = grep { !$ignores_rpmnew{$_} } @{$p2r{$_}} foreach keys %p2r; my $sum_rpmnew = sum(map { int @{$p2r{$_}} } keys %p2r); $sum_rpmnew == 0 and return 1; interactive_packtable( @@ -197,7 +196,7 @@ sub do_merge_if_needed() { # costly: open_rpm_db()->traverse(sub { my $n = my_fullname($_[0]); - $pkg2rpmnew{$n} = [ grep { (-r "$_.rpmnew" || -r "$_.rpmsave") } map { chomp_($_) } $_[0]->conf_files ]; + $pkg2rpmnew{$n} = [ grep { !$ignores_rpmnew{$_} && (-r "$_.rpmnew" || -r "$_.rpmsave") } map { chomp_($_) } $_[0]->conf_files ]; }); print "done.\n"; undef $wait; |