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 1KzETV-0003JY-Ds for garchives@archives.gentoo.org; Sun, 09 Nov 2008 17:53:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D1D68E01ED; Sun, 9 Nov 2008 17:53:24 +0000 (UTC) Received: from amun.cheops.ods.org (amun.cheops.ods.org [82.95.138.191]) by pigeon.gentoo.org (Postfix) with ESMTP id 8DC73E01ED for ; Sun, 9 Nov 2008 17:53:24 +0000 (UTC) Received: from tefnut.cheops.ods.org ([2001:888:1022:0:211:24ff:fe37:e46e] helo=gentoo.org) by amun.cheops.ods.org with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KzETR-0004yw-Mc for gentoo-dev@lists.gentoo.org; Sun, 09 Nov 2008 18:53:22 +0100 Date: Sun, 9 Nov 2008 18:53:25 +0100 From: Fabian Groffen To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Please review: function epunt_la_files for eutils.eclass Message-ID: <20081109175324.GO23310@gentoo.org> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <200811091704.10291.loki_val@gentoo.org> <200811091734.35331.loki_val@gentoo.org> <20081109164839.GM23310@gentoo.org> <200811091846.17579.loki_val@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: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <200811091846.17579.loki_val@gentoo.org> User-Agent: Mutt/1.5.18 (Darwin 8.11.0, VIM - Vi IMproved 7.2) Organization: Gentoo Foundation, Inc. X-Content-Scanned: by amun.cheops.ods.org (Exim Exiscan) using SpamAssassin and ClamAV X-Archives-Salt: 1369cdd4-1c84-43da-a8ed-369013ba7eaa X-Archives-Hash: 9183a33c99ddd78ebca4e0f0d7678ffe On 09-11-2008 19:46:12 +0200, Peter Alfredsen wrote: > > 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 > more. But c'est la vie. I meant I can't think of an issue when there is no .la file. > --- /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 > +} -- Fabian Groffen Gentoo on a different level