summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--lib/mouse.pm19
2 files changed, 14 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index b17f478..e65f082 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+- mousedrake:
+ o test if the file is there before trying to install the packages, that saves
+ a rpm -q in harddrake service after adding/removing/changing a mouse
+
Version 0.69 - 29 January 2008
- XFdrake:
diff --git a/lib/mouse.pm b/lib/mouse.pm
index 17ac8f4..9335c6f 100644
--- a/lib/mouse.pm
+++ b/lib/mouse.pm
@@ -435,15 +435,16 @@ sub various_xfree_conf {
output_with_perm($f, 0755, "xset m 1/8 1\n");
}
}
-
- my @pkgs = (
- if_($mouse->{synaptics}, 'x11-driver-input-synaptics'),
- if_($mouse->{evdev_mice}, 'x11-driver-input-evdev'),
- if_($mouse->{Protocol} eq 'vboxmouse', 'x11-driver-input-vboxmouse'),
- if_($mouse->{imwheel}, 'imwheel'),
- if_(@{$mouse->{wacom}}, 'linuxwacom'),
- );
- $do_pkgs->install(@pkgs) if @pkgs;
+
+ my $inputdrvpath = '/usr/lib/xorg/modules/input';
+ my @pkgs = [
+ if_($mouse->{synaptics}, ['x11-driver-input-synaptics', "$inputdrvpath/synaptics_drv.so"]),
+ if_($mouse->{evdev_mice}, ['x11-driver-input-evdev', "$inputdrvpath/evdev_drv.so"]),
+ if_($mouse->{Protocol} eq 'vboxmouse', ['x11-driver-input-vboxmouse', "$inputdrvpath/vboxmouse_drv.so"]),
+ if_($mouse->{imwheel}, ['imwheel', "/usr/bin/imwheel"]),
+ if_(@{$mouse->{wacom}}, ['linuxwacom', "$inputdrvpath/wacom_drv.so"]),
+ ];
+ $do_pkgs->ensure_files_are_installed(@pkgs, 1) if @pkgs;
if ($mouse->{imwheel}) {
my $rc = "/etc/X11/imwheel/imwheelrc.$mouse->{imwheel}";