All of lore.kernel.org
 help / color / mirror / Atom feed
* failure to remove+purge debian package generated by make deb-pkg
@ 2010-02-25 21:36 Uwe Kleine-König
  2010-02-25 22:29 ` Frans Pop
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2010-02-25 21:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Debian kernel team

Hello,

I created and successfully installed a custom kernel package using
$(make deb-pkg).

Then after a failed boot test I removed it and then thought that I
actually want to purge it.  Here's the result:

	user@host:~$ sudo dpkg --remove linux-image-2.6.33-rc8-rt
	(Reading database ... 153356 files and directories currently installed.)
	Removing linux-image-2.6.33-rc8-rt ...
	update-initramfs: Deleting /boot/initrd.img-2.6.33-rc8-rt

	user@host:~$ sudo dpkg --purge linux-image-2.6.33-rc8-rt
	(Reading database ... 150555 files and directories currently installed.)
	Removing linux-image-2.6.33-rc8-rt ...
	Purging configuration files for linux-image-2.6.33-rc8-rt ...
	Cannot delete /boot/initrd.img-2.6.33-rc8-rt, doesn't exist.
	run-parts: /etc/kernel/postrm.d/initramfs-tools exited with return code 1
	dpkg: error processing linux-image-2.6.33-rc8-rt (--purge):
	 subprocess installed post-removal script returned error exit status 1
	Errors were encountered while processing:
	 linux-image-2.6.33-rc8-rt

I didn't check if the problem is the package or initramfs-tools
(0.93.4).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: failure to remove+purge debian package generated by make deb-pkg
  2010-02-25 21:36 failure to remove+purge debian package generated by make deb-pkg Uwe Kleine-König
@ 2010-02-25 22:29 ` Frans Pop
  2010-02-27 22:03   ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Frans Pop @ 2010-02-25 22:29 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kbuild, debian-kernel

Uwe Kleine-König wrote:
> I created and successfully installed a custom kernel package using
> $(make deb-pkg).
> 
> Then after a failed boot test I removed it and then thought that I
> actually want to purge it.
> 
> Cannot delete /boot/initrd.img-2.6.33-rc8-rt, doesn't exist.
> run-parts: /etc/kernel/postrm.d/initramfs-tools exited with return code 1

It has nothing to do with the kernel package itself. The problem is in the 
maintainer scripts that are run as hooks from /etc/kernel/*.d.

The kernel package built by deb-pkg does not have any maintainer scripts of 
itself. All it does is run whatever is in the hooks. As custom kernels may 
have other requirements than distro ones it's not surprising that the 
distro hooks can throw errors [1].

Personally I use a set of custom hook scripts with my deb-pkg kernels. 
Simply because I don't want to have to fix issues that are the result of 
the distro hook scripts in /etc/kernel.

You can simply use custom hook scripts by doing e.g:
    export KDEB_HOOKDIR=/etc/kernel.custom
before calling 'make deb-pkg'. You can then create your own hook scripts 
in /etc/kernel.custom/{pre,post}{inst,rm}.d/.

Cheers,
FJP

[1] Although in this case I would say that the initrd could also simply be 
removed using 'rm -f' so it does not fail if it does not exist.
You could file a BR against the package that installed that particular hook 
script, probably initramfs-tools.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: failure to remove+purge debian package generated by make deb-pkg
  2010-02-25 22:29 ` Frans Pop
@ 2010-02-27 22:03   ` Uwe Kleine-König
  2010-03-01 11:23     ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2010-02-27 22:03 UTC (permalink / raw)
  To: Frans Pop; +Cc: linux-kbuild, debian-kernel

On Thu, Feb 25, 2010 at 11:29:11PM +0100, Frans Pop wrote:
> Uwe Kleine-König wrote:
> > I created and successfully installed a custom kernel package using
> > $(make deb-pkg).
> > 
> > Then after a failed boot test I removed it and then thought that I
> > actually want to purge it.
> > 
> > Cannot delete /boot/initrd.img-2.6.33-rc8-rt, doesn't exist.
> > run-parts: /etc/kernel/postrm.d/initramfs-tools exited with return code 1
> 
> It has nothing to do with the kernel package itself. The problem is in the 
> maintainer scripts that are run as hooks from /etc/kernel/*.d.
> 
> The kernel package built by deb-pkg does not have any maintainer scripts of 
> itself. All it does is run whatever is in the hooks. As custom kernels may 
> have other requirements than distro ones it's not surprising that the 
> distro hooks can throw errors [1].
> 
> Personally I use a set of custom hook scripts with my deb-pkg kernels. 
> Simply because I don't want to have to fix issues that are the result of 
> the distro hook scripts in /etc/kernel.
> 
> You can simply use custom hook scripts by doing e.g:
>     export KDEB_HOOKDIR=/etc/kernel.custom
> before calling 'make deb-pkg'. You can then create your own hook scripts 
> in /etc/kernel.custom/{pre,post}{inst,rm}.d/.
Actually I think it would be nice if the default configuration just
works.

I did some research and I concluded it's the fault of
/etc/kernel/postrm.d/initramfs-tools.  I think it should have the
following lines:

	# skip on purge
	[ "$DEB_MAINT_PARAMS" = "remove" ] || exit 0

I will report a bug against initramfs-tools.

> [1] Although in this case I would say that the initrd could also simply be 
> removed using 'rm -f' so it does not fail if it does not exist.
> You could file a BR against the package that installed that particular hook 
> script, probably initramfs-tools.
Actually this is my problem, the hook fails because the initrd is
missing.

Best regards and thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: failure to remove+purge debian package generated by make deb-pkg
  2010-02-27 22:03   ` Uwe Kleine-König
@ 2010-03-01 11:23     ` Uwe Kleine-König
  2010-03-01 11:52       ` Frans Pop
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2010-03-01 11:23 UTC (permalink / raw)
  To: Frans Pop; +Cc: linux-kbuild, debian-kernel

Hello,

> I did some research and I concluded it's the fault of
> /etc/kernel/postrm.d/initramfs-tools.  I think it should have the
> following lines:
> 
> 	# skip on purge
> 	[ "$DEB_MAINT_PARAMS" = "remove" ] || exit 0
> 
> I will report a bug against initramfs-tools.
It's already fixed in 072ad3179c526b90b57719e127de851182b04c4c[1] ==
0.93.4-16-g02cb277.

Should I report the problem anyhow?

Best regards
Uwe

[1] http://git.debian.org/?p=kernel/initramfs-tools.git;a=commitdiff;h=072ad3179c526b90b57719e127de851182b04c4c;hp=919c099e12308729a9a6bc141eab1f05532c93f8#patch2

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: failure to remove+purge debian package generated by make deb-pkg
  2010-03-01 11:23     ` Uwe Kleine-König
@ 2010-03-01 11:52       ` Frans Pop
  0 siblings, 0 replies; 5+ messages in thread
From: Frans Pop @ 2010-03-01 11:52 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kbuild, debian-kernel

On Monday 01 March 2010, Uwe Kleine-König wrote:
> It's already fixed in 072ad3179c526b90b57719e127de851182b04c4c[1] ==
> 0.93.4-16-g02cb277.
>
> Should I report the problem anyhow?

That would seem rather pointless.

Cheers,
FJP

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-01 11:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 21:36 failure to remove+purge debian package generated by make deb-pkg Uwe Kleine-König
2010-02-25 22:29 ` Frans Pop
2010-02-27 22:03   ` Uwe Kleine-König
2010-03-01 11:23     ` Uwe Kleine-König
2010-03-01 11:52       ` Frans Pop

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.