Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 2004 01:01:22 -0700
From:      Kent Stewart <kstewart@owt.com>
To:        Matt Navarre <mnavarre@cox.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: cvsup and ports INDEX
Message-ID:  <200406230101.22648.kstewart@owt.com>
In-Reply-To: <200406222356.37063.mnavarre@cox.net>
References:  <20040622220538.34e5e5a5@localhost> <200406222334.01861.kstewart@owt.com> <200406222356.37063.mnavarre@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 22 June 2004 11:56 pm, Matt Navarre wrote:
> On Tuesday 22 June 2004 11:34, you wrote:
> > > That's not what the man page implys:
> > >
> > >
> > >     "The portsdb command is a tool to generates the ports
> > > database named INDEX.db from the ports index file named INDEX. 
> > > It is commonly used among the tool suite and automatically
> > > updated on demand when it gets older than the index file"
> > >
> > > I'm not sayin' you're wrong, since I read that a long while ago
> > > and haven't needed to know anything more about portsdb since, but
> > > you and the description in portsdb(1) seem to disagree.
> > >
> > > Yes, the -U option does "Update or create the ports index file
> > > called INDEX", it's just not evident from the description that it
> > > can use the installed ports tree.
> >
> > If you are to run it after you cvsup ports-all, what do you think
> > it is using?
>
> The INDEX file that get cvsup'ed when I cvsup ports? I only sup ports
> once a month or so unless I'm installing something new, so I guess
> I'm getting a new INDEX most times.
>
> > In addition,  portsdb -U now runs "make index" but you would have
> > to search -ports@ to read about that change. You can read comments
> > about it on
> > http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/portupgrade/Ma
> >kefile see the commit message for version 1.78.
>
> Well, I don't track -ports, so, yes I missed that.
>
> I'm not trying to be combative here, I was wrong, a bit. I gave the
> portsdb man page  a quick once-over a while ago (when I started using
> portupgrade) and thought I understood what it was doing. I didn't
> realize the -U was regen'ing INDEX from the current ports tree, as I
> didn't realize that INDEX was updated with less frequency that the
> tree, so I didn't realize that was even needed, though it's obvious
> once I think about it.

I think obvious is a hindsight thing. The mind is really good at making 
bad assumptions. I was the on-site rep for a remote computer service 
center in Dallas. People would would have problems running computer 
programs because they would see what they thought they had typed and 
not what was in the data file. 

The INDEX you were cvsuping was an ancient one and that is why it pays 
to refuse ports/INDEX[-5]. Cvsup knows that the one you built isn't the 
one on the mirror and redownloads it. It takes several minutes to 
generate even from a mirror over a 100mps network. Then, you spend a 
lot more time generating the new one by running make index.

>
> It also explains why portsdb -Uu takes so freekin' long sometimes,
> which had been bugging me.

Yes, it takes quite awhile to generate. That is also why people are 
suggesting that the refuse comments in the HANDBOOK be changed to 
reflect that by using those refuses you will affect the generation of a 
proper INDEX. There is also the problem with MASTER/SLAVE ports. A 
SLAVE port is one that depend on information from the MASTER. If you 
have refused the MASTER, you are continuing to use ancient data when 
you build the SLAVEs.

Now, if you want to fetch a current INDEX[-5], you can run "make 
fetchindex" from /usr/ports. The problem is that the script 
occassionaly dies and what you get may not be current. You can tell by 
looking at the date on INDEX[-5]. If the script is working, the date 
will be less than an hour old. 

I generate all of my local ones on a test machine and it doesn't matter 
if I fetch or make the INDEX. I can make almost as fast as I can fetch. 
FreeBSD.org is a busy site and the transfer rate may not be that fast 
at times. I also back up and compress the old INDEX and keep about 5 
previous days worth. Bz2 will compress a 5.5 MB INDEX file into 548 KB 
file. The port update is a cronjob and I had been without a working 
INDEX on those rare occasions when make index totally fails. The backup 
copies make that more difficutl to happen.

Kent

>
> > Kent
> >
> > > So I was kinda right. A little :)
> > >
> > > > Kent
> > >
> > > Matt

-- 
Kent Stewart
Richland, WA

http://users.owt.com/kstewart/index.html



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