On Fri, Feb 18, 2005 at 06:16:29PM -0700, Duncan wrote:
> John Myers posted <[EMAIL PROTECTED]>,
> excerpted below,  on Fri, 18 Feb 2005 10:21:13 -0800:
> 
> > Perhaps some sort of 'hook' could be added to emerge sync that would allow
> > a program to be run after every sync?
> 
> Why?  Those who want such a thing can simply create a script that does it
> for them and invoke it instead of emerge sync.
> 
> That's what I've done.  I have a script called esyncw (short for emerge
> sync world, I've other e* scripts as well) that completes the emerge sync,
> and immediately does an emerge -avfuD world, giving me a chance to see
> what'll be downloaded and to say yes or no.
> 
> That's what scripting is for, to help automate tasks performed repeatedly,
> the same items in the same order each time.  No hooks needed as it's
> already easy enough for a sysadmin to arrange if that's what they want. 
> 
> They could even call it "emerge", place it earlier in the path, and if the
> only command line parameter added was "sync", run the sync and then the
> additional stuff, or if not, simply invoke Gentoo's emerge, passing the
> parameters to it as necessary.  I do something similar with other
> commands, and have /usr/local/(s)bin set first in the path so my version
> gets to process any parameters I pass first, before it gets sent to the
> normal version if the command line doesn't invoke any of my special
> parameters.
You just hit upon why it's not a huge priority.  Hooks for sync would still be 
useful though- imagine a setup where 
the cache is stored in an rdbms (fex), and after a sync you need to temporarily 
disable all access to the 
cache/remote tree you're providing while the cache is out of sync with the 
actual tree.

That ^^^ is a crazy example, but the hook would be useful for users imo.
~Brian

--
[email protected] mailing list

Reply via email to