From owner-freebsd-hackers Mon May 31 16:44:43 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 738D214D58 for ; Mon, 31 May 1999 16:44:37 -0700 (PDT) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <40374>; Tue, 1 Jun 1999 09:28:47 +1000 Date: Tue, 1 Jun 1999 09:44:28 +1000 From: Peter Jeremy Subject: Re: a two-level port system? To: hackers@FreeBSD.ORG Message-Id: <99Jun1.092847est.40374@border.alcanet.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I do agree that the current approach is fairly wasteful. Currently, an unpacked ports tree contains 61767 inodes and occupies 79967 1K-blocks (35184 inodes and 35215 blocks are CVS-related metadata). This covers 2374 ports in 41 categories. An average user probably builds 1-2% of these. How about storing each port as a single file in ar(5) format, which is unpacked into the directory structure when make'd? ar(5) is a text format, which means it can easily be managed by CVS, which includes a tool for manipulating its contents - ar(1). The ports would remain in the current categories. Each category directory would contain an `ARCHIVE' directory containing an ar file for each port. To package a port: - ar(1) all the current port files into a single file in a defined order. - CVS commit that file To unpack a port: - in the category directory, run `make portname'. If that port is not unpacked (the directory does not exist), it will create the directory and unpack the archive. Benefits: - The ports tree would become ~2500 inodes and ~~32MB. - The entire ports tree is still available on the machine. Disadvantages: - Unpacked ports will use about twice as much disk space (3 times if you include the original CVS archive). - ar(1) may need some tweaks to allow pathnames (not just filenames) as object names (and maybe to create directories). - Updating ports is not as easy (the port needs to be unpacked/repacked in the same order, with modification times and gid/uid maintained to stop the deltas bloating). Comments anyone? Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message