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