should add -f option to "rm" in kernel update script

Bug #190419 reported by Martin-Éric Racine
2
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Whenever trying to remove kernels inside the chroot, the postrm script fails:

(LTSP)root@voito:/# aptitude purge linux-image-2.6.22-14-386 linux-ubuntu-modules-2.6.22-14-386
Luetaan pakettiluetteloita... Valmis
Muodostetaan riippuvuussuhteiden puu
Reading state information... Valmis
Reading extended state information
Initializing package states... Valmis
Building tag database... Valmis
The following packages will be REMOVED:
  linux-image-2.6.22-14-386{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Do you want to continue? [Y/n/?] y
Writing extended state information... Valmis
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 16999 files and directories currently installed.)
Removing linux-image-2.6.22-14-386 ...
Purging configuration files for linux-image-2.6.22-14-386 ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/ltsp-update-kernels
Cannot open ``/boot/nbi.img-2.6.24-7-386'':File exists
run-parts: /etc/kernel/postrm.d/ltsp-update-kernels exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.22-14-386.postrm line 320.
dpkg: error processing linux-image-2.6.22-14-386 (--purge):
 subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-2.6.22-14-386
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Luetaan pakettiluetteloita... Valmis
Muodostetaan riippuvuussuhteiden puu
Reading state information... Valmis
Reading extended state information
Initializing package states... Valmis
Building tag database... Valmis
(LTSP)root@voito:/#

The solution seems to be to add -f to the "rm" command and to in fact delete the old file _before_ trying to create a new one, rather than after.

Related branches

Revision history for this message
Oliver Grawert (ogra) wrote :

i'd actually prefer a mv to a .bak file but yes, moving the file out of the way completely seems to fix it

Changed in ltsp:
importance: Undecided → Medium
milestone: none → hardy-alpha-5
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.0.40~bzr20080212-0ubuntu1

---------------
ltsp (5.0.40~bzr20080212-0ubuntu1) hardy; urgency=low

  * new upstream version with fixes for the following bugs:
   LP: #149006 (default to 24bit colordepth)
   LP: #190419 (move .nbi image out of the way before regeneration)
   LP: #113709 (security server sources.list entry handling)
   LP: #135419 (chroot upgrade issues)
   LP: #177926 (documentation fix)
   LP: #184316 (client locale handling (default to en_GB if none is set)
   LP: #189237 (fix path handling, remove trailing slashes from arguments)
   LP: #132397 (handle proxies with apt)
   LP: #148109 (only use getltscfg if lts.conf is valid)
   LP: #172459 (only use free nbd devices to do network swapping)
  * install our own dhcpd.conf
  * add rdesktop to ltsp-client deps (LP: #153589)
  * fix xorg deps of ltsp-client (LP: #158735)
  * add plugin for mythbuntu kiosk setup (LP: #188413), thanks to Michael Haas

 -- Oliver Grawert <email address hidden> Mon, 12 Feb 2008 17:48:48 +0100

Changed in ltsp:
status: In Progress → Fix Released
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.