Hugo Vanwoerkom <hvw59...@care2.com> writes:

> David Zelinsky wrote:
>> ... Worse, the linux-image package did not install properly, with
>> some part of the post-install script returning errors (zz-update-grub).
>> The rest of the dist-upgrade appeared to succeed, but the
>> linux-image-2.6.32-5-686 package is in a half-installed state.
>>
>> I tried removing the offending package ("apt-get remove") but got the
>> same error from the post-remove script.
>>
> <snip>
> what happens if you 'dpkg -P linux-image-2.6.32-5-686'

Same as running 'apt-get remove linux-image-2.6.32-5-686'.  The problem
was in the postrm script, which as Bob Proulx points out, gets run
by 'dpkg --remove', which is called by either of the above.


Bob Proulx <b...@proulx.com> writes:

> ... You can browse the script this way:
>
>   less /var/lib/dpkg/info/linux-image-2.6.32-5-686.prerm
>
> That script is going away when you remove the package.  So hacking it
> to avoid the error seems like the best solution.  It is simply calling
> all of the script parts at /etc/kernel/prerm.d/* and it is the
> /etc/kernel/prerm.d/zz-update-grub script that is giving you problem.
<snip>
> I would hack the /var/lib/dpkg/info/linux-image-2.6.32-5-686.prerm
> perl script with "exit(0);" at the top right after the #!/usr/bin/perl
> line.  Or I would remove grub-pc to remove the zz-update-grub script.
> Probably hacking the first is most direct.  It all depends.

It was the '.postrm' script, not '.prerm'.  That script does not go away
with 'apt-get remove', but it does with 'apt-get purge' (or 'dpkg -P').

In any case, I took Bob's suggestion to hobble the script with an exit
statement near the beginning, and that did the trick!  I was able to
purge the package, and apt-get now reports the system up to date.

I also checked that no linux-image package is installed, so presumably
this won't happen again.  But next time I'll also scrutinize the
proposed actions more closely to be sure.

Thanks for all suggestions.

-David


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87sj42soj7.fsf...@zeamays.dedekind.net

Reply via email to