If I accidentally try to install a package with a preinst or postrm
script, it fails as documented at
http://www.maemo.org/platform/docs/howtos/howto_making_an_application_package.html,
with an error message about not being able to chroot to
/var/lib/install.

My question is: having done this, how can I recover back to a sane
state, where I can fix the package and then try installing it again?
Nothing that I can think of works, as shown by the transcript appended
below.

Many thanks,
     Neil

[sbox-SDK_PC: ~/guile-1.6] > app-installer-tool install 
guile-maemo_1.6.7.1-1_i386.deb 
Selecting previously deselected package guile-maemo.
(Reading database ... 20 files and directories currently installed.)
Preparing to replace guile-maemo 1.6.7.1-1 (using 
guile-maemo_1.6.7.1-1_i386.deb) ...
Unpacking replacement guile-maemo ...
dpkg (subprocess): failed to chroot to `/var/lib/install': Operation not 
permitted
dpkg: warning - old post-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
dpkg: error processing guile-maemo_1.6.7.1-1_i386.deb (--install):
 there is no script in the new version of the package - giving up
Errors were encountered while processing:
 guile-maemo_1.6.7.1-1_i386.deb
failed
Installation of guile-maemo_1.6.7.1-1_i386.deb failed, removing package 
guile-maemo.
(Reading database ... 20 files and directories currently installed.)
Removing guile-maemo ...
dpkg (subprocess): failed to chroot to `/var/lib/install': Operation not 
permitted
dpkg: error processing guile-maemo (--purge):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 guile-maemo
Removing failed!
[sbox-SDK_PC: ~/guile-1.6] > sudo -u install dpkg --force-all -P guile-maemo
bash: sudo: command not found
[sbox-SDK_PC: ~/guile-1.6] > dpkg --force-all -P guile-maemo
dpkg - warning: ignoring request to remove guile-maemo which isn't installed.
[sbox-SDK_PC: ~/guile-1.6] > dpkg --root=/var/lib/install --force-all -P 
guile-maemo
(Reading database ... 20 files and directories currently installed.)
Removing guile-maemo ...
dpkg (subprocess): failed to chroot to `/var/lib/install': Operation not 
permitted
dpkg: error processing guile-maemo (--purge):
 subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
 guile-maemo
[sbox-SDK_PC: ~/guile-1.6] > app-installer-tool list
guile-maemo     1.6.7.1-1       2388    broken
maemo   1.0     0       ok
[sbox-SDK_PC: ~/guile-1.6] > 

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to