updating ports: make index... make fetchindex

i updated my ports tree last night with cvsup... now should i use
"make index"
or
"make fetchindex"

ive always used make fetchindex, but for some reason last night i used make index and it was *beep**beep**beep**beep**beep*ing about perl not being found.
 
Make index will create the index by looking at your current ports tree. Make fetchindex will just fetch the index from a repository server. Fetchindex has the potential of fetching a different index compared to the ports tree that is actually on your system.

I've been using csup and make index for many years and have grown accustomed to it, portsnap is more geared towards new users or one's that don't mess with the ports tree themselves.
 
cool, ok. well when i get back home im going to update the ports tree again and post the perl error i was getting. thx.
 
If you did cvsup or csup

Code:
/usr/ports# portsdb -Uu

should follow.

After make fetchindex

Code:
/usr/ports# portsdb -u
/usr/ports# portversion -l "<"
/usr/ports# portupgrade -arR
 
Unless you have lots of time on your hands, or you run it automatically at night, make fetchindex is preferred. The INDEX file on the download server is generated multiple times throughout the day, so there's very little chance of it being out-of-sync with the ports tree.

Last time I ran make index (before fetchindex was made available), it took 4 hours of disk thrashing to complete.
 
Erratus said:
If you did cvsup or csup

Code:
/usr/ports# portsdb -Uu

I really wish people would stop advocating the use of non-standard tools. portsdb is not part of the base OS. It's part of the portupgrade port. Not everyone uses the portupgrade port. Some don't use any ports management tools, others use portmaster, others use portmanager, etc.

Code:
/usr/ports# portsdb -u
/usr/ports# portversion -l "<"
/usr/ports# portupgrade -arR

Same with these, they're part of the portupgrade suite of tools, and not available on every system.

Use pkg_version -vl '<' instead of portversion. That comes with the base OS, uses /usr/ports/INDEX* and /var/db/pkg/*, and doesn't require any outside tools installed or outside DBs installed.

Also, you should never run portupgrade -a blindly. Very bad things can happen if you aren't paying attention.
 
phoenix said:
I really wish people would stop advocating the use of non-standard tools.

In the FreeBSD-Handbook can be read:

24.2.3 Major and Minor Upgrades

This process will remove old object files and libraries which will break most third party applications. It is recommended that all installed ports either be removed and re-installed or upgraded later using the ports-mgmt/portupgrade utility. Most users will want to run a test build using the following command:

# portupgrade -af

This will ensure everything will be re-installed correctly. Note that setting the BATCH environment variable to yes will answer yes to any prompts during this process, removing the need for manual intervention during the build process.

.... so what's wrong about this?
 
There's nothing wrong with advocating the use of ports management tools if you specify that they are not part of the base OS.

It's just really annoying to see all these posts like "use portsdb -uU" without any context that you first need to install portupgrade, or what it does, or why you need to do it.

Either just mention the tools available with the base install, or provide all the context on what the tools are, where to install them, what they do, why you'd use them instead of the base tools, etc.
 
phoenix said:
Last time I ran make index (before fetchindex was made available), it took 4 hours of disk thrashing to complete.
Make index only takes about 20 minutes here.
 
Nice. That's not that bad then, about the same amount of time as it takes csup to run a weekly update of the ports tree.
 
portsnap theoretically guarantees a consistent ports tree & INDEX: you're getting a snapshot of a sessile hierarchy.

with csup, you get whatever state the tree happens to be in when you get there, inconsistent INDEXes and all.

portsnap gives you the ports tree of an hour or two ago, csup gives you right effing now.

there are quite a few other differences.
 
Ah, of course. portsnap, which also explains the transfer improvement.

I can't say that I've missed csup/cvsup for keeping my ports tree up to date. I did not run csvup via cron on the ports tree, being a good citizen and all, and would always curse how long it took to even start let alone finish. portsnap certainly was a nice improvement. For that I can live with a snap shot of an hour or two ago.
 
Back
Top