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

Modifying a file from another package (rather than replacing it)

Hi (and happy hollidays)!

I've written a couple of extensions to pbuilder. When my package gets
installed, a file from the pbuilder package (/usr/sbin/pbuilder) must be
modified for my extension to work. I'm looking for the "proper" way to
apply a patch to that file.

I would like to patch rather than just replace the file because I don't
want to overwrite any changes to the file that might come with newer
versions of the original package. Ideally, I would even like to reapply
my patch whenever a different version of the file gets installed by a
new version of original package.

How do I do this from my package's maintainer scripts? I thought I could
use a diversion for the original file in preinst and then patch a copy
of it in postinst. But where should I (temporarily?) install the
patchfile? And is there any way to automatically have that patch
reapplied when a new version of the original file is installed?


Reply to: