aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-14 15:03:08 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-14 15:03:08 +0000
commitbb67d5caecd77211489acd8957665ff240902311 (patch)
tree6e6901c4935040c1fc434f1bad14df47628aeaf8
parentf4457d1600c531fde07735d3c3958e579376f840 (diff)
downloadrpmdrake-bb67d5caecd77211489acd8957665ff240902311.tar
rpmdrake-bb67d5caecd77211489acd8957665ff240902311.tar.gz
rpmdrake-bb67d5caecd77211489acd8957665ff240902311.tar.bz2
rpmdrake-bb67d5caecd77211489acd8957665ff240902311.tar.xz
rpmdrake-bb67d5caecd77211489acd8957665ff240902311.zip
Small optimization
-rwxr-xr-xrpmdrake33
1 files changed, 27 insertions, 6 deletions
diff --git a/rpmdrake b/rpmdrake
index 00f9190b..3eef7952 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1305,14 +1305,35 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
($urpm, \%installable_pkgs, \%update_descr);
}
+# /var/lib/nfs/etab /var/lib/nfs/rmtab /var/lib/nfs/xtab /var/cache/man/whatis
+my %ignores_rpmnew = map { $_ => 1 } qw(
+ /etc/adjtime
+ /etc/group
+ /etc/ld.so.conf
+ /etc/localtime
+ /etc/modules
+ /etc/passwd
+ /etc/security/fileshare.conf
+ /etc/shells
+ /etc/sudoers
+ /etc/sysconfig/alsa
+ /etc/sysconfig/autofsck
+ /etc/sysconfig/harddisks
+ /etc/sysconfig/init
+ /etc/sysconfig/installkernel
+ /etc/sysconfig/msec
+ /etc/sysconfig/nfs
+ /etc/sysconfig/pcmcia
+ /etc/sysconfig/rawdevices
+ /etc/sysconfig/saslauthd
+ /etc/sysconfig/syslog
+ /etc/sysconfig/usb
+ /etc/sysconfig/xinetd
+);
+
sub dialog_rpmnew {
my ($msg, %p2r) = @_;
- # /var/lib/nfs/etab /var/lib/nfs/rmtab /var/lib/nfs/xtab /var/cache/man/whatis
- my @ignores_rpmnew = qw(/etc/group /etc/passwd /etc/localtime /etc/shells /etc/adjtime /etc/ld.so.conf /etc/modules
- /etc/security/fileshare.conf /etc/sudoers /etc/sysconfig/alsa /etc/sysconfig/autofsck /etc/sysconfig/harddisks
- /etc/sysconfig/installkernel /etc/sysconfig/msec /etc/sysconfig/nfs /etc/sysconfig/pcmcia /etc/sysconfig/init
- /etc/sysconfig/rawdevices /etc/sysconfig/saslauthd /etc/sysconfig/syslog /etc/sysconfig/usb /etc/sysconfig/xinetd);
- @{$p2r{$_}} = grep { !member($_, @ignores_rpmnew) } @{$p2r{$_}} foreach keys %p2r;
+ @{$p2r{$_}} = grep { !$ignores_rpmnew{$_} } @{$p2r{$_}} foreach keys %p2r;
my $sum_rpmnew = sum(map { int @{$p2r{$_}} } keys %p2r);
$sum_rpmnew == 0 and return 1;
my @inspect_wsize = ($typical_width*2.5, 500);