From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Le6qB-0001gp-A1 for garchives@archives.gentoo.org; Mon, 02 Mar 2009 12:01:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4E754E038D; Mon, 2 Mar 2009 12:01:45 +0000 (UTC) Received: from smtp2.cybercity.dk (smtp2.cybercity.dk [212.242.43.252]) by pigeon.gentoo.org (Postfix) with ESMTP id 22AE7E038D for ; Mon, 2 Mar 2009 12:01:45 +0000 (UTC) Received: from user5.cybercity.dk (user5.cybercity.dk [212.242.41.51]) by smtp2.cybercity.dk (Postfix) with ESMTP id 554F4313C29 for ; Mon, 2 Mar 2009 13:01:44 +0100 (CET) Received: from ba.localnet (port78.ds1-abs.adsl.cybercity.dk [212.242.227.17]) by user5.cybercity.dk (Postfix) with ESMTP id 31815628D5 for ; Mon, 2 Mar 2009 13:01:44 +0100 (CET) From: Bo =?iso-8859-1?q?=D8rsted_Andresen?= To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: perl-module.eclass -- review - 2 Date: Mon, 2 Mar 2009 13:01:41 +0100 User-Agent: KMail/1.11.0 (Linux/2.6.26-tuxonice; KDE/4.2.0; i686; ; ) References: <20090227140852.GA28775@veller.net> <20090302033455.GC1955@comet> <20090302053455.TA31dba.tv@veller.net> In-Reply-To: <20090302053455.TA31dba.tv@veller.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903021301.43298.bo.andresen@zlin.dk> X-Archives-Salt: 76b25f89-e562-40fd-84a3-8b78be8a72eb X-Archives-Hash: a88cfcbbc3684e4681274e30bb6337a2 On Monday 02 March 2009 08:24:35 Torsten Veller wrote: > > > find "${D}/${VENDOR_LIB}" -type f -a \( -name .packlist \ > > > -o \( -name '*.bs' -a -empty \) \) -delete > > > find "${D}/${VENDOR_LIB}" -depth -mindepth 1 -type d -empty -delete > > > > I'm curious how portable the find () construct is. Do you know? It was established well over a year ago that find in the ebuild environment must be GNU find. Using portable find is not worth the pain. [...] > > Could you just use dosed here? dosed needs to die. [...] > BTW: After I looked up the devmanual part about "find" above, I wonder: > | find "${S}" -type f | while read f ; do > | [...] > | for f in $(find "${S}" -type f) ; do > | [...] > | Warning > | In both cases, files with weird characters or spaces in their names may > | cause serious problems. The while loop breaks with leading or trailing spaces in the path. If the spaces are anywhere else in the path it works. The for loop breaks with spaces regardless of where they are. And you can of course come up with weird characters that break them both. If you really want to do better use: find "${S}" -print0 | while read -rd '' f; do if file "${f}" ... done You also really should provide proper die messages. -- Bo Andresen