Trading cautiously on new ports
chandanh at gmail.com
Sat Feb 25 00:58:51 PST 2006
I managed to recover from my misadventures (trying to upgrade
gnome) the dumb way, namely, by reinstalling FreeBSD (6.0
Release) and the ports from the ISO CD images. Fortunately the
process is fast and painless. Hats off to the folks who make the
ISO images. I have over 300 ports installed. The only inconsistency
I encountered so far was the unavailability of pdflib 6.0.1 as a
dependency for gnuplot. Looks like only pdflib 6.0.2 is available
on the net at the moment and gnuplot port in the ISO CD refuses
to build with pdflib 6.0.2 sources.
This led me to find out how to check out the effects of installing a new
port or new versions of installed ports (from a portsnap fetch or cvsup
download) non-destructively by extracting the new version of a port
<PATH> as a non-root user in a different ports directory, for example:
"portsnap -p /home/myports extract print/pdflib"
and by attempting to build the new port version with "make" rather
than with "make install clean". This way I have no risk of upsetting
my installed ports (installed as root) since anyway I cannot write in
/usr/local or /usr/X11R6 etc as the non-root user. Once I see that
the new port build finds all the installed dependency ports in order
and the build completes without surprises, I rebuild it as root,
deinstall the previous port version, and install the new one or can
do a portsnap extract followed by a portupgrade (this time into
/usr/ports) safely. I did this for pdflib+gnuplot. Have to try this on
a large and complex port such as gnome.
I understand that there is no such thing as "solving the stale dependency
problem once and for all" (thanks for all the illuminating discussion on the
ports/packages). But is there a clean command for reporting the
dependencies (with versions) of a new port or a new port version
without actually attempting to make/install/ or upgrade it? And may be
such a command also shows the versions of these dependencies installed
on the system at the moment, so that one can have a sneak preview of
any upgrade trouble brewing? The closest to this I see is "pkg_add -n"
but it requires a built package. I was hoping that there was a way
to do this kind of dependency analysis by extracting the dependencies
from the ports descriptions, but I haven't been able to figure out the
commands necessary for that.
Sometimes a potentially complex upgrade is not life-critical and may be
I want to upgrade only if I'm sure that it won't lead to the kind of chaos
I landed myself into with my gnome upgrade attempt. Until I see a safe
way such as the above, I'll probably wait till the next suitable ISO CDs
to upgrade major stuff such as FreeBSD itself, X11, and Gnome.
More information about the freebsd-questions