From owner-freebsd-current Mon Jul 22 1:32:49 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1D3037B400 for ; Mon, 22 Jul 2002 01:32:42 -0700 (PDT) Received: from axl.seasidesoftware.co.za (axl.seasidesoftware.co.za [196.31.7.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACD8C43E5E for ; Mon, 22 Jul 2002 01:32:40 -0700 (PDT) (envelope-from sheldonh@starjuice.net) Received: from sheldonh by axl.seasidesoftware.co.za with local (Exim 3.36 #1) id 17WYd4-0008UR-00; Mon, 22 Jul 2002 10:33:18 +0200 Date: Mon, 22 Jul 2002 10:33:18 +0200 From: Sheldon Hearn To: Eric Anholt Cc: John Angelmo , current@FreeBSD.ORG Subject: Re: Still no XFree86-4 Message-ID: <20020722083318.GK15711@starjuice.net> Mail-Followup-To: Eric Anholt , John Angelmo , current@FreeBSD.ORG References: <3D3929DF.4020200@veidit.net> <1027307313.1068.32.camel@anholt.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="A6N2fC+uXW/VQSAv" Content-Disposition: inline In-Reply-To: <1027307313.1068.32.camel@anholt.dyndns.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On (2002/07/21 21:08), Eric Anholt wrote: > You don't have XFree86-4 uninstalled, or don't have it uninstalled > successfully. Just removing the XFree86-4 metaport doesn't remove the > miniports that contain the actual files. If you are going to build > without using portupgrade, you should start from scratch wrt XFree86 > (all XFree86-4 ports uninstalled along with imake-4). I find the situation with the XFree86-4 metaports annoying, so allow me to share my "portdeps" solution. I use this perl script to build all dependencies of a port, in the correct order, before building the port itself. I use /usr/ports/makefile as follows: | MY_STUFF?= \ | archivers/unzip \ | ... | x11/XFree86-4 \ | ... | x11/xlockmore | | MY_FULL_LIST!= ${.CURDIR}/Tools/portdeps ${MY_STUFF} | SUBDIR?= ${MY_FULL_LIST} | | update: | @cvs -qR update -dPA ${SUBDIR} | | .include The script /usr/ports/Tools/portdeps is attached. I wrote it in a hurry ages ago, so it's probably a little sucky. Then, I can do this to build all the ports I want, along with all their dependencies, in the correct order: cd /usr/ports make install make clean Or, I can just build one particular port, with all its dependencies, in the correct order: cd /usr/ports make MY_STUFF=x11/XFree86-4 Ciao, Sheldon. --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=portdeps #!/usr/bin/perl -w # # Takes one or more "port name" arguments, each consisting of the name of a # port, preceded by its primary category and a forward slash, e.g. # # databases/gnats # # EXAMPLE: # # cd /usr/ports # portdeps `make -f ./makefile -V SUBDIR` # use strict; my $PROGNAME = 'portdeps'; my %desired; my %required_by; my %mustbuild; my %seen; my %unresolved; my @buildlist; my $basedir; my $loop_prot; my $deps_only; $basedir = `pwd`; chomp $basedir; if (defined($ARGV[0]) and $ARGV[0] eq '-d') { $deps_only = 1; shift @ARGV; } foreach (@ARGV) { $unresolved{$_} = 1; $desired{$_} = 1; } $loop_prot = 100; while (keys %unresolved and $loop_prot--) { foreach my $port (keys %unresolved) { my (@index_parts, $make_out, @prereqs); next if $seen{$port}++; $mustbuild{$port} = 1; delete $unresolved{$port}; chdir($basedir) or die "$PROGNAME: chdir: $basedir: $!\n"; chdir($port) or die "$PROGNAME: chdir: $port: $!\n"; $make_out = `make describe`; if ($?) { die "$PROGNAME can't make describe: $port\n"; } @index_parts = split(/\|/, $make_out); $index_parts[1] =~ /([^\/]+\/[^\/]+)$/; $port = $1; @prereqs = split(' ', "$index_parts[7] $index_parts[8]"); foreach my $req_path (@prereqs) { my $req; $req_path =~ /([^\/]+\/[^\/]+)$/; $req = $1; if (exists $required_by{$req}) { push(@{$required_by{$req}}, $port); } else { $required_by{$req} = [ $port ]; $unresolved{$req} = 1; } } } } $loop_prot = 100; while (keys %mustbuild and $loop_prot--) { CANDIDATE: foreach my $candidate (keys %mustbuild) { foreach my $dependency (@{$required_by{$candidate}}) { if (not grep {$_ eq $dependency} @buildlist) { next CANDIDATE; } } unshift(@buildlist, $candidate); delete($mustbuild{$candidate}); } } foreach my $port (@buildlist) { if (not $deps_only or not exists $desired{$port}) { print "$port\n"; } } exit 0; --A6N2fC+uXW/VQSAv-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message