diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-10-11 16:50:53 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-10-11 16:50:53 +0000 |
commit | a8c947169a3d9d6b2369980de1ab0031a160b147 (patch) | |
tree | 34483e068ed140b3cf47dd80a45192c2b88a1870 /eclass/eutils.eclass | |
parent | Remove old (diff) | |
download | historical-a8c947169a3d9d6b2369980de1ab0031a160b147.tar.gz historical-a8c947169a3d9d6b2369980de1ab0031a160b147.tar.bz2 historical-a8c947169a3d9d6b2369980de1ab0031a160b147.zip |
prune_libtool_files(): fix removing symlinked .la files.
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index fb2a2370fd06..7cad6186cfec 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.406 2012/10/07 06:22:01 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.407 2012/10/11 16:50:53 mgorny Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -1414,6 +1414,7 @@ prune_libtool_files() { done local f + local queue=() while IFS= read -r -d '' f; do # for all .la files local archivefile=${f/%.la/.a} @@ -1423,7 +1424,7 @@ prune_libtool_files() { if grep -q '^shouldnotlink=yes$' "${f}"; then if [[ -f ${archivefile} ]]; then einfo "Removing unnecessary ${archivefile#${D%/}} (static plugin)" - rm -f "${archivefile}" + queue+=( "${archivefile}" ) fi # The .la file may be used by a module loader, so avoid removing it @@ -1474,9 +1475,13 @@ prune_libtool_files() { if [[ ${reason} ]]; then einfo "Removing unnecessary ${f#${D%/}} (${reason})" - rm -f "${f}" + queue+=( "${f}" ) fi - done < <(find "${D}" -type f -name '*.la' -print0) + done < <(find "${D}" -xtype f -name '*.la' -print0) + + if [[ ${queue[@]} ]]; then + rm -f "${queue[@]}" + fi } check_license() { die "you no longer need this as portage supports ACCEPT_LICENSE itself"; } |