[csw-maintainers] package hooks (update)

Philip Brown phil at bolthole.com
Fri Jul 3 03:03:47 CEST 2009


On Thu, Jul 02, 2009 at 08:43:36PM -0400, Ben Walton wrote:
[http://wiki.opencsw.org/package-hooks]
> <snip>
> Proposed Per-package Hooks:
> 
> install
> ...

> That's the existing text (with s/update/upgrade/).  Not clear enough?

no it's not clear enough :) you need to be explicit, and state
whether or not a "upgrade" hook overlaps install/remove hooks, or whether
it gets called instead of them.
You also have to explicitly define the order of calling, if they both
get run

[hmm actually, you sort of say this in your examples. but you make
 some mistakes in your examples :) for example, you mix stating
  that something is being "installed" vs being "upgraded", in the same
   sample paragraph]

It's best to state explicitly in the specification, the 'correct'
behaviour.
Examples are suposed to explain the specification, not be instead of
the specification.




> There is no distinction between batchinstall or batchupgrade if that's
> what you were asking.  We could note the difference by adding a
> batchupgrade hook if you think that's worthwhile.  I'm not sure it is,
> but it wouldn't necessarily hurt either.

If you think it's neccessary to have a per-package upgrade, i think you
should provide for a batch upgrade, just for completeness. even if you cant
think of a use for it now, someone later might, if you provide a hook for
it.

> See purge (per-package) and batchremove (batch).  I used purge since
> that's the term Dago proposed in his mail the other day.

Please note: "purge" is DIFFERENT from "remove".

It has a long-understood meaning in the debian world, and possibly others.

"remove" means "run pkgrm".
"purge" should mean "run pkgrm, and REMOVE ANY LEFTOVERS"
  (in other words, remove any capability/saved state for a delayed upgrade via
    pkgadd later)




More information about the maintainers mailing list