public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Frans Pop <elendil@planet.nl>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-kbuild@vger.kernel.org, debian-kernel@lists.debian.org
Subject: Re: failure to remove+purge debian package generated by make deb-pkg
Date: Thu, 25 Feb 2010 23:29:11 +0100	[thread overview]
Message-ID: <201002252329.12338.elendil@planet.nl> (raw)
In-Reply-To: <20100225213610.GA30380@pengutronix.de>

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.

  reply	other threads:[~2010-02-25 22:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002252329.12338.elendil@planet.nl \
    --to=elendil@planet.nl \
    --cc=debian-kernel@lists.debian.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox