package gpm 1.20.4-4 fails to install if /dev/psaux is missing

Bug #1238813 reported by Pavel Roskin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gpm (Ubuntu)
New
Undecided
Unassigned

Bug Description

"apt-get install gpm" fails in the install script.

/etc/init.d/gpm: 66: /etc/init.d/gpm: cannot open /dev/psaux: No such file
invoke-rc.d: initscript gpm, action "restart" failed.
dpkg: error processing gpm (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 gpm

I'm using a custom compiled kernel. It has no support for the legacy /dev/psaux device. It supports /dev/input/mice. I believe the later should be default for gpm.

The error is 100% reproducible. However, it may not happen if gpm was started, then uninstalled, and the system wasn't restarted, as the stale /dev/mouse would prevent the script from failing.

I believe the way of testing for the file being readable in /etc/init.d/gpm is wrong. It fails and makes the script exit on the first attempt. Look at this example:

$ cat mtest
#! /bin/sh
for foo in 1 2 3; do
  if :< /dev/missing; then break; fi
  sleep 1
done

$ sh -x mtest
mtest: 3: mtest: cannot open /dev/missing: No such file
+ :

It would be better to use "test -r" instead. Also, I don't think the install script should fail even if gpm cannot be started. It's normal to install something, then configure it and then use it.

I'm using Ubuntu 12.04.3 LTS i386 with a x86_64 kernel 3.12.0-rc4

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: gpm 1.20.4-4
Uname: Linux 3.12.0-rc4-00062-g2fe80d3-dirty x86_64
ApportVersion: 2.0.1-0ubuntu17.5
AptOrdering:
 gpm: Install
 gpm: Configure
Architecture: i386
Date: Fri Oct 11 09:39:40 2013
DuplicateSignature: package:gpm:1.20.4-4:subprocess installed post-installation script returned error exit status 2
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationMedia: Lubuntu 12.04 "Precise Pangolin" - Release i386 (20120423)
MarkForUpload: True
SourcePackage: gpm
Title: package gpm 1.20.4-4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Pavel Roskin (proski) wrote :
tags: removed: need-duplicate-check
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.