aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2015-03-23 10:08:41 +0100
committerRémi Verschelde <remi@verschelde.fr>2015-03-23 10:08:41 +0100
commitbbb23d5e8e55648b5c717d2a08be1f5ec848aaf1 (patch)
treeb2b3ffc581011bd2985e473950a6a9c4f125b607
parentc70271a095e9d2e1427003d7b5674861c385c96e (diff)
downloadcolin-keep-bbb23d5e8e55648b5c717d2a08be1f5ec848aaf1.tar
colin-keep-bbb23d5e8e55648b5c717d2a08be1f5ec848aaf1.tar.gz
colin-keep-bbb23d5e8e55648b5c717d2a08be1f5ec848aaf1.tar.bz2
colin-keep-bbb23d5e8e55648b5c717d2a08be1f5ec848aaf1.tar.xz
colin-keep-bbb23d5e8e55648b5c717d2a08be1f5ec848aaf1.zip
rpmdragora: filter out critical config files from the .rpm{new,save} handling logic after installing packages (Martin Whitaker, mga#14266)
-rw-r--r--Changes4
-rw-r--r--lib/ManaTools/Rpmdragora/pkg.pm2
-rw-r--r--lib/ManaTools/Rpmdragora/rpmnew.pm7
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};
+}
+
#=============================================================