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

Custom dpkg pre/post install/remove scripts



Is there any way that I can get dpkg to run custom scripts either before
or after it runs a package's pre/post install/remove scripts?

I know that I can configure apt-get to run pre/post invoke scripts, but
I'd like to hook into dpkg because not everything is done through apt.

The reason I want this is so I can do custom extensions to the package
management. eg.
  . Keep an audit log of all package installation, removal,
    configuration, etc.
  . Put all the config files from packages under local version control
    so that I can see what changed when, and so I can do a three-way
    diff to automatically merge my local config file changes.
  . Call dpkg-repack on some packages so I can rollback more easily.

Ideally I'd like to have my own scripts called in addition to the
package control scripts, with the same arguments.

Can anyone suggest how I may do this?



Reply to: