From owner-freebsd-questions@FreeBSD.ORG Sun Jun 13 09:09:38 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC73E16A4CE for ; Sun, 13 Jun 2004 09:09:38 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12D7443D48 for ; Sun, 13 Jun 2004 09:09:37 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i5D98PuO080309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Jun 2004 10:08:26 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i5D98MEO080304; Sun, 13 Jun 2004 10:08:22 +0100 (BST) (envelope-from matthew) Date: Sun, 13 Jun 2004 10:08:22 +0100 From: Matthew Seaman To: Graham North Message-ID: <20040613090822.GB75168@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Graham North , freebsd-questions@freebsd.org, tim@typhoon.techvalley.ca, robert@irrelevant.com, "Fong, Nicholas" References: <002201c45111$801acb30$627ba8c0@phoenix> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b5gNqxB1S1yM7hjW" Content-Disposition: inline In-Reply-To: <002201c45111$801acb30$627ba8c0@phoenix> User-Agent: Mutt/1.5.6i X-Greylist: Message not sent from an IPv4 address, not delayed by milter-greylist-1.3.8 (smtp.infracaninophile.co.uk [0.0.0.0]); Sun, 13 Jun 2004 10:08:26 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040612, clamav-milter version 0.72a on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: robert@irrelevant.com cc: tim@typhoon.techvalley.ca cc: freebsd-questions@freebsd.org cc: "Fong, Nicholas" Subject: Re: Pruning the Ports Tree X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jun 2004 09:09:38 -0000 --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Lose 10 karma points for not keeping your line lengths reasonably short. On Sat, Jun 12, 2004 at 11:41:47PM -0700, Graham North wrote: > Is it alright to prune the Ports tree - and still do updates later. You're on your own if you do this. All of the infrastructure that supports the use of the prots tree assumes that you will have a complete tree in place. People telling cvsup to refuse chunks of the ports tree (usually the language specific stuff) and then finding that building the INDEX no longer works are a perennial sight on the freebsd-ports@... mailing list. Having said that, now that you can just grab a freshly build INDEX =66rom the FreeBSD servers and there's no huge necessity to build your own, refusing stuff should be less of a trap for the unwary. Use # cd /usr/ports # make fetchindex to grab a fresh index (about 5MiB). > I am running 4.8 stable and recently did a full Ports tree update using C= VSUP. This generates several questions. > 1) I took the advice of Michael Urban's book and upgraded from the "Head"= of the source tree rather than from that for 4.8 - did I really want to do= that? Does it matter for a Ports only updating? That is correct. You as an individual user should only ever want to grab the HEAD of the ports tree. All those RELEASE_4_10_0 labels just mark the state of the tree at the point that the various release CDs or DVDs were compiled. You'll note the difference compared to the system sources, which use RELENG_4_10 and similar: such labels simply do not exist within the ports tree, and if you try and cvsup ports specifying one of them, cvsup will simply delete everything under /usr/ports. > 2) The tree is getting pretty big - result, lots of files. My hard driv= e is not very big - it is down to a few hundred inodes (file handles) withi= n the usr directory. Can I prune the tree on my hard drive without compro= mising future updates? If it helps, my machine is not using X only command= mode so there are lots of Ports that will never be made. The ports tree isn't actually that big, considering that there are now about 11,000 ports. However, as you use the ports, you will tend to generate all sorts of other files and directories within the tree that take up lots of space. Such as: i) Distfiles -- the source code for the ports you have installed. Use 'portsclean -D' to get rid of any out of date distfiles, or 'portsclean -DD' to get rid of any distfiles that don't correspond to ports you have installed. ii) README.html files. These appear if you run "make readmes" -- they're not necessary for day to day use of the ports tree, and can just be deleted. Plus not having 'README.html' files around keeps them out of the way of cvsup(1). To kill them all off: # cd /usr/ports # find . -name README.html -print0 | xargs -0 rm iii) work directories -- the directories where each port is actually built. Once the port has been installed there's not much use for hanging onto those. If you use portupgrade it will usually clean them up as it goes along. Otherwise you can do: # portsclean -C or alternatively: # cd /usr/ports # make clean -DNOCLEANDEPENDS If you don't use '-DNOCLEANDEPENDS' the clean-up will take a great deal longer to eventually produce exactly the same result. It's true that the ports tree does consist of a large number of quite small files, and that will tend to use up inodes quite rapidly. However, you can't increase the number of inodes on a filesystem without wiping it out completely and rebuilding from scratch. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --b5gNqxB1S1yM7hjW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAzBmGiD657aJF7eIRAqYuAKCcbOgh1jG9YIC135JZOlUiNzDzbQCgsJ1X +pXkejCmfaus2g/gNxSkDIU= =o7Wj -----END PGP SIGNATURE----- --b5gNqxB1S1yM7hjW--