From bbb23d5e8e55648b5c717d2a08be1f5ec848aaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 23 Mar 2015 10:08:41 +0100 Subject: rpmdragora: filter out critical config files from the .rpm{new,save} handling logic after installing packages (Martin Whitaker, mga#14266) --- Changes | 4 ++++ lib/ManaTools/Rpmdragora/pkg.pm | 2 +- lib/ManaTools/Rpmdragora/rpmnew.pm | 7 ++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 50fffb2..ef77fdb 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ + - rpmdragora: filter out critical config files from the + .rpm{new,save} handling logic after installing packages + (Martin Whitaker, mga#14266) + 1.0.0-8 17/02/2015 22:22 - Added common shortcuts for dialog push buttons such as About, Quit, OK, Cancel (Translators should set the '&' in the diff --git a/lib/ManaTools/Rpmdragora/pkg.pm b/lib/ManaTools/Rpmdragora/pkg.pm index ba0b18b..4c39356 100644 --- a/lib/ManaTools/Rpmdragora/pkg.pm +++ b/lib/ManaTools/Rpmdragora/pkg.pm @@ -965,7 +965,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( foreach my $id (@rpms_upgrade) { my $pkg = $urpm->{depslist}[$id]; next if $pkg->arch eq 'src'; - $pkg2rpmnew{$pkg->fullname} = [ grep { -r "$_.rpmnew" || -r "$_.rpmsave" } $pkg->conf_files ]; + $pkg2rpmnew{$pkg->fullname} = [ grep { (-r "$_.rpmnew" || -r "$_.rpmsave") && !ignore_rpmnew($_) } $pkg->conf_files ]; } statusbar_msg_remove($id); rpmnew_dialog($loc->N("The installation is finished; everything was installed correctly. diff --git a/lib/ManaTools/Rpmdragora/rpmnew.pm b/lib/ManaTools/Rpmdragora/rpmnew.pm index 659c0b2..86f4d10 100644 --- a/lib/ManaTools/Rpmdragora/rpmnew.pm +++ b/lib/ManaTools/Rpmdragora/rpmnew.pm @@ -42,7 +42,7 @@ use yui; use Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(rpmnew_dialog do_merge_if_needed); +our @EXPORT = qw(ignore_rpmnew dialog_rpmnew do_merge_if_needed); my $loc = ManaTools::rpmdragora::locale(); @@ -74,6 +74,11 @@ my %ignores_rpmnew = map { $_ => 1 } qw( /etc/sysconfig/xinetd ); +sub ignore_rpmnew { + my ($conf_file) = @_; + $ignores_rpmnew{$conf_file}; +} + #============================================================= -- cgit v1.2.1