how to correct corrupted ports tree?
Polytropon
freebsd at edvax.de
Sat Nov 17 10:02:10 UTC 2012
On Fri, 16 Nov 2012 21:56:21 -0700, Gary Aitken wrote:
> I don't see a way to force refetch of the actual ports files
> like "distinfo" when portsnap thinks the port is up to date.
You cansolve the problem of "few per-file mismatches" by
using the traditional CVS approach of updating the ports
tree. Only files not matching the current (on-server) content
will be updated.
For example, if you can "predict" in which categories errors
appear, only update those. Let's assume the problem you experience
is only in the ports base directory.
Create a file /etc/sup/ports.sup with the following content:
*default host=cvsup.freebsd.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress
ports-base
You can use "ports-lang" to update the lang category only, or
"ports-all" for the whole tree. Note that incorporating all
those small deltas may take some time!
An example file with all categories can be found here:
/usr/share/examples/cvsup/ports-supfile
Then add this to /etc/make.conf:
SUP_UPDATE= yes
SUP= /usr/bin/csup
SUPFLAGS= -L 2
SUPHOST= cvsup.freebsd.org
PORTSSUPFILE= /etc/sup/ports.sup
Maybe choose a near mirror for better performance.
Now do this:
# cd /usr/ports
# make update
Now according to this example, the base files for /usr/ports will
be checked for changes and (being different) will be updated.
Also note that this approach sometimes is more current than
using portsnap. There might be deltas in the CVS ports tree
already that might not be yet in the most current ports snapshot.
However, this is an "old-fashioned" approach; I'm not sure for
how long it will work. :-)
See "man 5 make.conf" for details, as well as "man 7 ports".
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list