Unable to upgrade to latest version

Bug #88105 reported by Chris Jones on 2007-02-26
20
Affects Status Importance Assigned to Milestone
hotkey-setup (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: hotkey-setup

In the process of updating my feisty machine today I got:

-(cmsj@tenshu)-(~)- sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
  libxine1 xine-ui
The following packages will be upgraded:
  hotkey-setup
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
27 not fully installed or removed.
Need to get 0B/17.6kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]?
(Reading database ... 151849 files and directories currently installed.)
Preparing to replace hotkey-setup 0.1-17ubuntu3 (using .../hotkey-setup_0.1-17ubuntu5_i386.deb) ...
KDSETKEYCODE: Invalid argument
failed to set scancode 80 to keycode 256
invoke-rc.d: initscript hotkey-setup, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
KDSETKEYCODE: Invalid argument
failed to set scancode 80 to keycode 256
invoke-rc.d: initscript hotkey-setup, action "stop" failed.
dpkg: error processing /var/cache/apt/archives/hotkey-setup_0.1-17ubuntu5_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/hotkey-setup_0.1-17ubuntu5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

grendelkhan (scottricketts) wrote :

I get the exact same error. Regardless of redownloading the file, verifying the contents of it, dpkg can't install it.

Paul Sladen (sladen) wrote :

 hotkey-setup (0.1-17ubuntu6) feisty; urgency=low
 .
   * Make "/etc/init.d/hotkey-setup stop" *not* fail if keystate cannot
     be restored before stopping (upgrade failure).
     (Closes LP: #88105)

Paul Sladen (sladen) wrote :

Hello, for anyone who still has this problem, the new packages should fix it by always succeeding.

If you can't get the new package, or are still having an issue wit the upgrade, then if you run:

  sudo /etc/init.d/hotkey-setup stop

and *then* continue with the upgrade, that should work. The problem here is the the prerm (Pre-removal) script for the currently installed version can fail in some corner cases.

Changed in hotkey-setup:
status: Unconfirmed → Fix Released
grendelkhan (scottricketts) wrote :

Stopping the daemon is the problem:

grendel@wile-e-coyote:/tmp$ sudo dpkg -i hotkey-setup_0.1-17ubuntu6_i386.deb
Password:
Selecting previously deselected package hotkey-setup.
(Reading database ... 222875 files and directories currently installed.)
Preparing to replace hotkey-setup 0.1-17ubuntu3 (using hotkey-setup_0.1-17ubuntu6_i386.deb) ...
KDSETKEYCODE: Invalid argument
failed to set scancode 80 to keycode 256
invoke-rc.d: initscript hotkey-setup, action "stop" failed.
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
KDSETKEYCODE: Invalid argument
failed to set scancode 80 to keycode 256
invoke-rc.d: initscript hotkey-setup, action "stop" failed.
dpkg: error processing hotkey-setup_0.1-17ubuntu6_i386.deb (--install):
 subprocess new pre-removal script returned error exit status 1
Errors were encountered while processing:
 hotkey-setup_0.1-17ubuntu6_i386.deb

If I can't get the stop command on the init script to run, I can't get the new version installed. How do I avoid the KDSETKEYCODE error?

woodmeister (mark-woodward3k) wrote :

Exactly the same problem here, the daemon cannot be stopped manually or by the pre-removal script

grendelkhan (scottricketts) wrote :

SOLVED!

Do a sudo chmod 444 /etc/init.d/hotkey-setup and then reboot. This stops the daemon from starting in the first place, and while the script isn't executable, it will allow you to upgrade the package. Change the permissions on the file back to normal and then reboot again.

kernelOfTruth (dalinuxlova) wrote :

@grendelkhan :

this helped, thanks

DON'T REBOOT!:
sudo chmod 444 /etc/init.d/hotkey-setup
then sudo /etc/init.d/hotkey-setup stop

(if you can't open up another gnome-terminal / have closed gnome-terminal & gnome-panel crashed, just switch to tty2:
ctrl + alt + f2, then login and do the above steps)

for restarting / reviving gnome-panel:
killall gnome-panel

then switch back to X:
ctrl + alt + f7

open up a new gnome-panel (alt + f2 -> gnome-panel)
sudo apt-get dist-upgrade

now update should continue

Gsibbery (lejeunerandy) wrote :

Worked for me. I didn't have to reboot, just chmod then continue with the updates. Thanks a bunch! I am running Gutsy Gibbon now!

Brian O'Reilly (fade-ubuntu) wrote :

deleting the file in /var/run/hotkey-setup works fine, without the need to reboot. This is still a problem for feisty -> gutsy upgrades.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers