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 1Le2XG-0008OW-I3 for garchives@archives.gentoo.org; Mon, 02 Mar 2009 07:25:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3284DE02BA; Mon, 2 Mar 2009 07:25:56 +0000 (UTC) Received: from smtprelay10.ispgateway.de (smtprelay10.ispgateway.de [80.67.29.24]) by pigeon.gentoo.org (Postfix) with ESMTP id D4EC5E02BA for ; Mon, 2 Mar 2009 07:25:55 +0000 (UTC) Received: from [80.134.79.16] (helo=arkane.local) by smtprelay10.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Le2XC-00041T-Ul for gentoo-dev@lists.gentoo.org; Mon, 02 Mar 2009 08:25:55 +0100 Received: by arkane.local (Postfix, from userid 1000) id 21C34853E; Mon, 2 Mar 2009 08:24:36 +0100 (CET) Date: Mon, 2 Mar 2009 08:24:35 +0100 From: Torsten Veller To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Re: perl-module.eclass -- review - 2 Message-ID: <20090302053455.TA31dba.tv@veller.net> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20090227140852.GA28775@veller.net> <20090228113953.TAb8d40.tv@veller.net> <20090302033455.GC1955@comet> 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=us-ascii Content-Disposition: inline In-Reply-To: <20090302033455.GC1955@comet> Jabber-ID: tove@jabber.ccc.de X-PGP-Fingerprint: 0416 3C11 8D79 65B9 AAD0 2065 BBC7 14D1 9C67 CD96 User-Agent: Mutt/1.5.19 (2009-01-27) X-Df-Sender: 1067115 X-Archives-Salt: bbd1cdda-69dc-4677-af56-0789203cdf3e X-Archives-Hash: 534d9cddfea06f086750edc92bb71473 * Donnie Berkholz : Thanks for your comments. > On 12:28 Sat 28 Feb , Torsten Veller wrote: > > case "${EAPI:-0}" in > > 0|1) > > EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm src_compile src_install src_test src_unpack > > ;; > > *) > > EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install > > ;; > > esac > > Maybe this is just me, but I prefer to reserve '*' cases for the > fallback when I don't understand what I'm given. As this is a general problem we should move it out of this thread. I also think this should have been discussed months ago. > > 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? http://www.opengroup.org/onlinepubs/000095399/utilities/find.html The brackets are no problem. But -mindepth and -delete are not in the specs: | The -mindepth and -maxdepth options are GNU extensions that should be | avoided if possible. (from devmanual.g.o) Well, even the portage ebuild uses -mindepth. So should I replace it? | The `-delete' action was introduced by the BSD family of operating | systems (from `info find`) and is also used several times in the tree. > > find "${D}" -type f -not -name '*.so' | while read f ; do > > if file "${f}" | grep -q -i " text" ; then > > if grep -q "${D}" "${f}" ; then ewarn "QA: File contains a temporary path ${f}" ; fi > > sed -i -e "s:${D}:/:g" "${f}" || die > > Could you just use dosed here? I guess you mean the default expression? dosed defaults to "s:${D}::g" $D is supposed to end with a trailing slash. -> is the path still absolute? Strange at least. 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. Is there still a problem in the snippet above and is the following better (if we assume that packages contain files with sane names)? pushd "${D}" > /dev/null for f in $(find . -type f -not -name '*.so' ) ; do if file "${f}" | grep -q -i " text" ; then sed -i -e "s:${D}:/:g" "${f}" || die fi done popd > /dev/null Maybe i need some coffee.