diff options
author | 2013-05-21 14:05:31 +0000 | |
---|---|---|
committer | 2013-05-21 14:05:31 +0000 | |
commit | 89ad67a072e480a2e826828cd03d36185a7d85e0 (patch) | |
tree | 2c9dd4901b5df3af479e6f8f7d74eaa8c6a37d21 /eclass/eutils.eclass | |
parent | version bump, remove old (diff) | |
download | gentoo-2-89ad67a072e480a2e826828cd03d36185a7d85e0.tar.gz gentoo-2-89ad67a072e480a2e826828cd03d36185a7d85e0.tar.bz2 gentoo-2-89ad67a072e480a2e826828cd03d36185a7d85e0.zip |
Replace the .la sanity check by one used in libtool itself. Fixes removing qmake-generated .la files, bug #470206.
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index c8147313006d..7970a661587b 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.419 2013/05/21 02:57:22 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.420 2013/05/21 14:05:31 mgorny Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -1462,6 +1462,13 @@ prune_libtool_files() { while IFS= read -r -d '' f; do # for all .la files local archivefile=${f/%.la/.a} + # The following check is done by libtool itself. + # It helps us avoid removing random files which match '*.la', + # see bug #468380. + if ! sed -n -e '/^# Generated by .*libtool/q0;4q1'; then + continue + fi + [[ ${f} != ${archivefile} ]] || die 'regex sanity check failed' local reason pkgconfig_scanned local snotlink=$(sed -n -e 's:^shouldnotlink=::p' "${f}") @@ -1480,11 +1487,7 @@ prune_libtool_files() { reason='module' fi - elif [[ ${snotlink} == no ]]; then - - # A valid .la file must have a valid 'shouldnotlink='. - # That assumption helps us avoid removing random files - # which match '*.la', see bug #468380. + else # Remove .la files when: # - user explicitly wants us to remove all .la files, |