From owner-freebsd-ports Tue Mar 12 6:45:43 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81]) by hub.freebsd.org (Postfix) with ESMTP id 1653737B64F; Tue, 12 Mar 2002 06:33:54 -0800 (PST) Received: from fwd04.sul.t-online.de by mailout03.sul.t-online.com with smtp id 16knAy-0002sJ-07; Tue, 12 Mar 2002 15:22:52 +0100 Received: from spirit.corecode.ath.cx (320050403952-0001@[217.82.54.55]) by fmrl04.sul.t-online.com with esmtp id 16knAk-0oQY4mC; Tue, 12 Mar 2002 15:22:38 +0100 Received: from elevation.zuhause.stoert.net (elevation.zuhause.stoert.net [192.168.66.46]) by spirit.corecode.ath.cx (8.11.6/8.11.6) with ESMTP id g2CEMas61638; Tue, 12 Mar 2002 15:22:36 +0100 (CET) (envelope-from corecode@corecode.ath.cx) Received: (from corecode@localhost) by elevation.zuhause.stoert.net (8.11.6/8.11.6) id g2CEMRt40389; Tue, 12 Mar 2002 15:22:27 +0100 (CET) (envelope-from corecode) Date: Tue, 12 Mar 2002 15:22:17 +0100 From: "Simon 'corecode' Schubert" To: Michael Lucas Cc: j.kossen@home.nl, doc@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: porters handbook chapter 17 - Automated package list creation Message-Id: <20020312152217.40c69c42.corecode@corecode.ath.cx> In-Reply-To: <20020312090910.A91593@blackhelicopters.org> References: <20020312130202.GA87740@jochem.dyndns.org> <20020312090910.A91593@blackhelicopters.org> X-Mailer: Sylpheed version 0.7.2claws (GTK+ 1.2.10; i386--freebsd4.5) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=.TxVJzm.6wBx3aP" X-Sender: 320050403952-0001@t-dialin.net Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --=.TxVJzm.6wBx3aP Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit actually i've developed a "simple" script which deals with this issue: #!/bin/sh (find . ; tar tzf ../mtree.x11-4.tgz) | sed -e 's,/$,,;s,^\./,,' | sort|uniq -u | while read d; do [ -d "$d" ] && echo -n "@dirrm "; echo $d; done | sed -e '/^@/{G;h;d;};${g;}' this one expects ../mtree.x11-4.tgz to get the list of existing files and directories, i know it's bloody dirty, but it's something to start from: one could replace the tar part with a pre-generated list of mtree allowed files and dir. after merging the after-install list with the "allowed" list, both are cleaned, sorted and unified. the remainings (things that should be removed) are then tested for being a directory and the apropriate @dirrm is inserted. after that the whole list is resorted to place directory removal at the end in reverse order to do a depth-first removal. done. oh yes, while you're (doc) at it, you should change that paragraph concerning BSD.local.dist, because this is not always true! x apps need BSD.x11-4.dist or BSD.x11.dist! somebody should clarify that. hope somebody is helped with that cheerz simon -- /"\ http://corecode.ath.cx/ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News --=.TxVJzm.6wBx3aP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) iD8DBQE8jg8ir5S+dk6z85oRAsLFAJ0RD0HKDyBh6qAw7vUkdYHT5JY/CACghS+T UCC6pTWfQMDi4rAqHpMsfNM= =vR1o -----END PGP SIGNATURE----- --=.TxVJzm.6wBx3aP-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message