Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2001 21:29:55 +1000
From:      "Andrew Reilly" <areilly@bigpond.net.au>
To:        Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca>
Cc:        abram olson <dacia_icarus@yahoo.com>, Kris Kennaway <kris@obsecurity.org>, stable@FreeBSD.ORG
Subject:   Re: mass uninstall all ports?
Message-ID:  <20010716212955.A13345@gurney.reilly.home>
In-Reply-To: <200107151507.f6FF7J906933@cwsys.cwsent.com>; from Cy.Schubert@uumail.gov.bc.ca on Sun, Jul 15, 2001 at 08:06:50AM -0700
References:  <20010715072109.16767.qmail@web13503.mail.yahoo.com> <200107151507.f6FF7J906933@cwsys.cwsent.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 15, 2001 at 08:06:50AM -0700, Cy Schubert - ITSD Open Systems Group wrote:
> Watching this discussion I've been toying around with the idea of 
> creating a pkg_tree application, which would print out port 
> dependencies.  However I won't entertain starting that project until my 
> new Tripwire 2.3.1 port is complete, which is currently being tested in 
> parallel with Tripwire 1.3.1, which I think should be fully tested and 
> ready for inclusion in our ports collection in about 2-4 weeks from now.

Just in case anyone wants some other perspectives, I have been
toying with a package updating/rebuilding mechanism of compiling
a list of everything that is currently installed, in dependancy
order, then blowing everything away, then rebuilding from the
list.

Here's my dependancy-ordered list building script.  It's rough,
and it has some ugly hacks to select only the version that I'm
actually interested in, where ports are available in multiple
versions:


#!/bin/sh
ls -1 /var/db/pkg |\
sed -e 's/-[^-]*$//' |\
while read i; do grep "^$i-[^-]*|" /usr/ports/INDEX ; done |\
sed -e '/^netscape-navigator-4.08/d;/^python-1.5/d;/^mpd-2/d;/^samba-2.2/d;/^tk-8\.[02]/d;/^tcl-8\.[02]/d;/^squid-2.[23]/d;/^bash-1/d;/^xemacs-19/d;/^xemacs-20/d;/^tkrat-1/d' |\
awk -F \| '{print $1, $8, $9}' |\
sed -e 's/XFree86-3.3.6_9/XFree86-4.1.0_4/g;s/ghostscript-5.50a/ghostscript-6.50_6/g;/^python-2.0/d' |\
awk '{ if (NF>1) for (i=2; i<NF; i++) print $i, $1; else print $1, $1 }' |\
tsort

The first time I've used this, I follow it with another pipe
that produces a list of /usr/ports/foo/bar directories that
corresponds to each of the port names, and then run a loop that
cd's to each of them in turn, and does a make install clean.

The only catches that I came across were:
* The 'distfiles' that I've been maintaining by CVS or patch
  (mozilla, wine, XFree86) generally fail the checksum test, and
  I haven't worked out a way to assert IGNORE_CHECKSUM just for
  those.

* Some of the ports require interaction.  I dare say that there
  is a flag to turn this off, but I haven't found it yet.

* There's some ugly interaction with openGL, the
  XFree86-4/matrox G200 gl support and the xscreensaver port
  that always stops the gnome port from building.  I usually
  just comment that line out of the RUN_DEPENDS in the makefile.

-- 
Andrew

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010716212955.A13345>