Re: User-provided post-install script?
On Wed, Nov 07, 2007 at 12:50:30PM +0100, Christian Jaeger wrote:
> Hello
>
> (I haven't found an answer to this in the FAQ and Debian documentation or
> elsewhere (I did only look for two hours, though; maybe I haven't found the
> right place for advanced Debian documentation yet?).)
>
> Is there a way for me to set up a script/hook locally for a particular
> package so that when that package is being upgraded (e.g. through security
> upgrades), that script/hook is being run automatically after the
> installation?
I thought of 'man apt.conf' looking at this:
------------------------------------------------------
HOW APT CALLS DPKG
Several configuration directives control how APT invokes dpkg(8).
These are in the DPkg section.
options
This is a list of options to pass to dpkg. The options must
be specified using the list notation and each list item is passed as a
single argument to dpkg(8).
Pre-Invoke, Post-Invoke
This is a list of shell commands to run before/after invoking
dpkg(8). Like options this must be specified in list notation. The
commands are invoked in order
using /bin/sh, should any fail APT will abort.
------------------------------------------------------
So apt-get calls dpkg and dpkg has 'post-invoke' options that run a
shell script. Never tried this but this seem like a place to start.
>
> The reason I'm asking is (this time) that the file
> /usr/lib/perl/5.8.8/Encode/Unicode/UTF7.pm (in package "perl") has a bug (a
> needless warning that hurts me). Since I needed a fix quickly and didn't
> assume that it would be fixed in Debian stable anyway I just fixed it
> locally.
Please report ANY bug. I'm not sure why you would assume that a bug in
stable would not be fixed?
> Of course after an upgrade the issue returns. Similar situations
> have occurred repeatedly, so I'm looking for a general solution. (I'm not
> [yet?] looking for a way to automatically refetch source packages and patch
> and rebuild them instead of installing the binary package for the case
> where the sources of a compiled program need to be patched, albeit that
> would be interesting as well.)
Hope that helps,
Kev
--
| .''`. == Debian GNU/Linux == | my web site: |
| : :' : The Universal |mysite.verizon.net/kevin.mark/|
| `. `' Operating System | go to counter.li.org and |
| `- http://www.debian.org/ | be counted! #238656 |
| my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian! |
|_______ Unless I ask to be CCd, assume I am subscribed _______|
Reply to: