Re: portsdb



On 05/12/06 03:20, gareth wrote:
On Wed 2006-05-10 (11:29), Jonathan Noack wrote:
You are probably experiencing some of the VFS limitations in 5.3 (you'll
be pleasantly surprised by 6.1!). "portsdb -Uu" is very CPU and IO
intensive; it takes a long time on a fast machine. "make fetchindex" is
provided as a replacement for having to run "portsdb -Uu". The only
downside is that the downloaded INDEX-5.db may be a few hours out of date.

it looks like 'make fetchindex' only gets INDEX-5.bz2, then unzips it,
then i need to make a INDEX-5.db. anyway, 'portsdb -Uu' may be
CPU/IO intensive, but that alone shouldn't be powering down the machine?

Ah, I made a mistake in my explanation. Replace INDEX-5.db with
INDEX-5. Sorry for the confusion...

"make fetchindex" downloads the INDEX-x file (where 'x' is the major
release number of the version of FreeBSD you are using -- in this case
'5'). When this file is newer than INDEX-x.db, the portupgrade tools
will automatically build an updated version of INDEX-x.db. As such, it
is not necessary to do anything further than "make fetchindex".
Building INDEX-x takes forever (and may be overheating your machine
causing freezes/reboots), but building INDEX-x.db is quite fast.

If you want to make sure everything is updated with a single command,
replace the '-U' with '-F' for "portsdb -Fu" (hehe -- I love it when
arguments work out like that...). That will 1) download the INDEX-x
file instead of building it from scratch, and then 2) build an updated
INDEX-x.db.

Here's how long it takes on my 6.1-RELEASE server (dual Pentium3):
$ time portsdb -Fu
Fetching the ports index ... done
[Updating the portsdb <format:bdb_btree> in /usr/build ... - 14630 port
entries found
.........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000......
..... done]

real 0m17.378s
user 0m14.691s
sys 0m1.936s
$

but, if i just run portversion, it creates the INDEX-5.db,
so i'm not sure why i'm running 'portsdb -Uu' in the first
place?
I would highly recommend checking out portsnap; it builds an up-to-date
INDEX-5.db file automatically as part of the update process.

so what is 'portversion' building, that is different to what 'portsdb -Uu'
would do? thanx re portsnap, will have a look but can't at the moment.

Correction: portsnap automatically builds an up-to-date INDEX-x, not
INDEX-5.db. "portversion" is building the INDEX-x.db file from INDEX-x.

See the portsdb(1) man page for more info.

-Jonathan

--
Jonathan Noack | noackjr@xxxxxxxxxxxxxxx | OpenPGP: 0x991D8195

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • portsdb -Uu and make fetchindex
    ... When I created my nightly-run ports-cvsup script, ... cvsup command I also do a fetchindex, followed by portsdb. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: portsdb
    ... "make fetchindex" downloads the INDEX-x file (where 'x' is the major ... is not necessary to do anything further than "make fetchindex". ... Building INDEX-x takes forever (and may be overheating your machine ... 'portsdb -u' is the same as the first part of 'portversion' ...
    (freebsd-stable)
  • Re: portsdb -Uu results in coredump
    ... > managed to skip the portsdb -Uu step after the make fetchindex step. ... unexec command for '/bin/rmdir -p ... and then I get the same ruby coredump after all that. ...
    (freebsd-stable)
  • Re: portsdb -Uu vs make fetchindex vs make index
    ... > I am not sure if I quite understand this entire ports updating scenario ... Running portsdb -U will make an index. ... then cd /usr/ports && make fetchindex. ... then write scripts to accomplish it, and/or set it up as a cron job. ...
    (freebsd-questions)
  • Re: Why does portsdb -Uu run so long?
    ... make fetchindex. ... make installkernel ... shutdown -r now ... Try portsdb -uUF ...
    (freebsd-questions)