tech-pkg archive

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

Re: suggestion: hook for pkg_add is needed



> Sometimes when a package is installed it is necessary to do some
> additional actions. I personally whould like to postprocess MESSAGE
> content (collect, email or something similar), to change permissions
> for SUID executables or anything else.

> I think it whould be nice to have an optional external program which
> is run at installation stage and have binary/package_name/anything_else
> as its argument.

Such hooks for pkg_add and pkg_delete commands can also be used for
building a custom package database.  Many people want it (not me). Or
a database that links filenames to package name or something similar.
For this, it is only necessary to provide two types of hooks: 'register'
and 'unregister' and provide an easily parseable information about
package, i.e. list of files in it, size, checksums etc.

I even think that normal actions for 'register'ing and 'unregister'ing
actions (i.e. creating things in /var/db/pkg) can also be implemented
with a help of such hooks.

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index