[csw-maintainers] package hooks

Ben Walton bwalton at opencsw.org
Thu Jun 25 15:18:35 CEST 2009


Excerpts from Peter Bonivart's message of Thu Jun 25 04:31:10 -0400 2009:
> On Thu, Jun 25, 2009 at 4:46 AM, Ben Walton<bwalton at opencsw.org> wrote:
> > I thought I'd get the discussion of hooks for the package tools going
> > by posting a bit of code.  This is completely untested, but is
> > encapsulates the vision I have of how hooks could be implemented.
> > [Please excuse my rusty perl.]
> 
> Looks nice, thanks for the patch! I'll add it to 1.7. :-)

Cool! :)

Are there points of discussion before it gets 'adopted' though?
Should install be differentiated from upgrade?  Should the hooks run
per-package?  Are there any other useful points that should be hooked?
Is the path I picked (/etc/opt/csw/pkg-hooks) acceptable?

Since this system would (presumably) be implemented by any csw utility
that is going to add/remove packages, we should all be happy with the
initial choices up front...not to say we couldn't change things later,
but smart choices are definitely better.

> > The pkgutil patch implements pre/post install/remove hook capabilities
> > that allow the admin (or other packages) to have code run at various
> > points during the management of CSW packages.
> 
> And these hooks will be provided by packages like etckeeper?

Etckeeper will likely be the first to leverage the hooks.  On my
Ubuntu and RHEL systems, there are various other things that hook into
the provided plugin systems.

With RHEL5, Redhat moved away from their up2date system and simply
provides a yum plugin (rhnplugin) that hooks into the facilities
provided by yum.  There is also a downloadonly yum plugin that I've
installed.  Things like the Ubuntu update-notifier use the hooks to
maintain a timestamp so that if you've just done a manual package
update, it won't bother checking again, etc.  As long as the system is
flexible enough, there are lots of creative things that can be done.

Thanks
-Ben
-- 
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20090625/5d5ef0e5/attachment-0002.asc>


More information about the maintainers mailing list