diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-05-21 14:05:31 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-05-21 14:05:31 +0000 |
commit | 89ad67a072e480a2e826828cd03d36185a7d85e0 (patch) | |
tree | 2c9dd4901b5df3af479e6f8f7d74eaa8c6a37d21 /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')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/eutils.eclass | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index e4eaa76143f5..afa670c3ea64 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.833 2013/05/21 01:31:02 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.834 2013/05/21 14:05:31 mgorny Exp $ + + 21 May 2013; Michał Górny <mgorny@gentoo.org> eutils.eclass: + Replace the .la sanity check by one used in libtool itself. Fixes removing + qmake-generated .la files, bug #470206. 21 May 2013; Mike Gilbert <floppym@gentoo.org> distutils-r1.eclass, python-r1.eclass, python-single-r1.eclass: 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, |