Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Dec 2004 08:55:38 -0500
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        freebsd-questions@freebsd.org
Cc:        Christopher Illies <christopher.illies@molmed.ki.se>
Subject:   Re: Typo in: cache-update (portindex) - hangs(?)
Message-ID:  <1102946139.77329.16.camel@zappa.Chelsea-Ct.Org>
In-Reply-To: <20041213103804.3D8C116A4D1@hub.freebsd.org>
References:  <20041213103804.3D8C116A4D1@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 13 Dec 2004 09:55:55 +0100, Christopher Illies
<christopher.illies@molmed.ki.se> wrote:


>  > Thanks for your reply and sorry for the typo. Yes cache-init also
> took
> > > a couple of hours on my computer, but when it finished i got the
> command-promt
> > > back. But I am having problems with cache-update. I include the
> last
> > > paragraphs of my original post with the typo corrected:
> > > 
> > > for upating the portstree I do:
> > > # cvsup -g -L 2 ports-supfile
> > > # cache-update
> > > # portindex -o /usr/ports/INDEX-5 (I am using 5-stable)
> > > # portsdb -u (I am also using portupgrade)
> > > # portupgrade -arR (or whatever)
> >  
> > What happens if you add
> > 
> > # make fetchindex
> > 
> > immediately after the cvsup?
> 
> I just tried it and it does not change the behaviour of cache-update.
> cache-update still shows a short burst of activity before it becomes
> idle, but does not return to the command promt.

The reason cache-update becomes idle is that it is waiting for input:
specifically, it's waiting for something from which it can determine the
latest changes to your /etc/ports hierarchy.  (See the cache-update man
page for more details.)

In your case, you should just be able to pipe the output of the cvsup
command into cache-update to achieve the desired effect.  (You might
need to use "cache-update -f cvsup-output" the tell it what kind of
input format you're feeding it.)  In other words, try something akin to
this:

     cvsup -g -L 2 ports-supfile | cache-update -f cvsup-output

I use the "cvsup-checkouts" input format when running cache-update.  In
other words, my cache-update command is as follows (I'm running
-CURRENT):

cache-update -f cvsup-checkouts -i /var/db/sup/ports-all/checkouts.cvs:.

(Note that the final "." is significant.)

Cache-update can also use the "-f plain" input format in conjunction
with its "find-updated" command to look for changes made after a given
date.  See the find-updated man page for details.

So, you have a lot of flexibility in how you can update the portindex
cache.

> But if I understand it correctly, isn't the whole purpose of the
> portindex-suite to provide yet another mechamism to create an up to
> date INDEX(-5) file, but both being faster than 'make index' (portsdb 
> -U) and more up to date than 'make fetchindex'? So wouldn't the 'make
> fetchindex' kind of defeat the purpose of using portindex? Sorry,  for
> all the questions, I am still trying to figure this all this out for
> myself. I am still quite unexperienced in FreeBSD .. ;-) 

You are correct.  If you have portindex installed then using "make
fetchindex" does indeed defeat the purpose. :-)

Cheers,

Paul.
-- 
e-mail: paul@gromit.dlib.vt.edu

"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
        --- Frank Vincent Zappa



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1102946139.77329.16.camel>