Trading cautiously on new ports

2006-02-25 Thread Chandan Haldar

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.

Chandan

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Trading cautiously on new ports

2006-02-25 Thread Parv
in message [EMAIL PROTECTED],
wrote Chandan Haldar thusly...

 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
...
 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

Alternatively, you could change the owner of $PORTS/distfiles 
$WRKDIRPREFIX to your own user id;  run make build in the
directory of desired port.  If successful, run make install as
root.  That way, you would save time and unnecessary compilation.


 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?

One way is by parsing 'INDEX*' (see textproc/p5-FreeBSD-Ports) which
lists the dependency of ports.  Other is running 'make
pretty-print-run-depends-list pretty-print-build-depends-list' in a
port directory[0].  Yet another method is to run make -V
RUN_DEPENDS; make -V BUILD_DEPENDS


 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.

You need pkg_info(1) command listed in SEE ALSO section of
pkg_add(1) man page.  Use the -r option to list dependencies of a
installed port/package.


[0] Oddly, pretty-print-run-depends-list target is listing no
dependencies in print/teTex ...

  This port requires package(s)  to run.

... which is just absurd as indicated by make -V RUN_DEPENDS ...

  /misc/local/share/texmf-local/ls-R:/misc/ports/print/tex-texmflocal \
  /misc/local/share/texmf-dist/LICENSE.texmf:/misc/ports/print/teTeX-texmf \
  latex:/misc/ports/print/teTeX-base \
  dvips:/misc/ports/print/dvipsk-tetex \
  xdvi:/misc/ports/print/xdvik


  - Parv

-- 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]