[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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?
>
> 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. 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.)

I never did this.  So please research using the following as hints.

dpkg-divert(8) seems to be the answer for your case.  (But this is not
meant for general user but meant for maintanance script).  As I
understand, removing divert etc has some pitfalls if you are as good as
me.

Another one is dpkg called from apt has hooks. APT.CONF(5)

There, you may to smart things.

Read tha manpages :-)

Osamu



Reply to: