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 1KzEO7-0002TL-L4 for garchives@archives.gentoo.org; Sun, 09 Nov 2008 17:47:51 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 15635E0151; Sun, 9 Nov 2008 17:47:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BD280E0151 for ; Sun, 9 Nov 2008 17:47:50 +0000 (UTC) Received: from 0x3ef266d2.svgnxx4.dynamic.dsl.tele.dk (0x3ef266d2.svgnxx4.dynamic.dsl.tele.dk [62.242.102.210]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id AA59B643BC for ; Sun, 9 Nov 2008 17:47:48 +0000 (UTC) From: Peter Alfredsen To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Please review: function epunt_la_files for eutils.eclass Date: Sun, 9 Nov 2008 19:46:12 +0200 User-Agent: KMail/1.9.10 References: <200811091704.10291.loki_val@gentoo.org> <200811091734.35331.loki_val@gentoo.org> <20081109164839.GM23310@gentoo.org> In-Reply-To: <20081109164839.GM23310@gentoo.org> 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: multipart/signed; boundary="nextPart10575173.seBNvhnox3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200811091846.17579.loki_val@gentoo.org> X-Archives-Salt: efce4020-537b-4a34-93c0-ce043cc80c12 X-Archives-Hash: f61cd837789275f438e55b1c46a8a1ac --nextPart10575173.seBNvhnox3 Content-Type: multipart/mixed; boundary="Boundary-01=_kHyFJJH0se2POXA" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_kHyFJJH0se2POXA Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 09 November 2008, Fabian Groffen wrote: > You could identify ELF a bit more reliable by running file on e.g. > "${ROOT}/bin/bash", or just by building a list of CHOSTs that you > know are ELF systems. D'oh, should have thought of that. See attached patch. > > > > + debug-print "scanelf not found, this appears to be a non-ELF > > > > system." + debug-print "non-ELF systems are likely to need .la > > > > files." + debug-print ".la files not removed from ${TARGET}" > > > > > > rationale? > > > > "I've been told" that .la files are really only needed on non-ELF > > systems and with plugin systems that use dlopen. I actually have no > > way of knowing that the .la files are needed on those arches, but I > > had your archs in mind when doing the patch. > > Ok. What worries me though is that this would result in some systems > having libtool files whereas the majority does not. E.g. removing > them apparently fixes a problem that then crops up on those systems > or something. Can't think of any atm. I can. If you have .la files, you will need to revdep-rebuild a lot=20 more. But c'est la vie. =2D-=20 /PA --Boundary-01=_kHyFJJH0se2POXA Content-Type: text/x-diff; charset="utf-8"; name="eutils.eclass.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eutils.eclass.patch" --- /usr/portage/eclass/eutils.eclass 2008-09-28 07:06:15.000000000 +0200 +++ eutils1.eclass 2008-11-09 18:26:44.000000000 +0100 @@ -1805,5 +1805,37 @@ ) || die else newbin "${tmpwrapper}" "${wrapper}" || die fi } + +# @FUNCTION: epunt_la_files +# @USAGE: [dir to scan] +# @DESCRIPTION: +# .la files can cause many unpleasantries when they disappear, +# forcing rebuilds of seemingly unrelated packages. +# This function removes the .la files from [dir to scan], "${D}" if not set. +# A good time to start punting .la files may be when a .so bump happens, +# so dependent packages do not have to be rebuilt twice. +# +# See also: +# bug 245889 +# http://blog.flameeyes.eu/2008/07/02/again-about-la-files-or-why-should-they-be-killed-off-sooner-rather-than-later + +epunt_la_files() { + debug-print-function $FUNCNAME "$@" + local TARGET=$1 + [ -z "${TARGET}" ] && TARGET="${D}" + + # If this is a non-ELF system, chances are good that the .la files will be needed. + if [[ "$(file ${ROOT}/bin/bash)" =~ " ELF " ]] + then + debug-print "ELF system found, proceeding..." + ebegin "Removing useless .la files" + find "${TARGET}" -name '*.la' '(' -type l -o -type f ')' -exec rm -f '{}' '+' + eend 0 + else + debug-print "This appears to be a non-ELF system." + debug-print "non-ELF systems are likely to need .la files." + debug-print ".la files not removed from ${TARGET}" + fi +} --Boundary-01=_kHyFJJH0se2POXA-- --nextPart10575173.seBNvhnox3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkkXIekACgkQtEGUx4TfHiSgOwCfdE4zeMKA6PXm0VEsFQ9Uox6a +SYAoKlQF7YEGpmTVAJ5Aw8FRiBspwP6 =oPgj -----END PGP SIGNATURE----- --nextPart10575173.seBNvhnox3--