summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-10-11 16:50:53 +0000
committerMichał Górny <mgorny@gentoo.org>2012-10-11 16:50:53 +0000
commit495262d0ea449ac0370ca1c4565b35f4cad4d3e9 (patch)
treed89497088bb872a804df3cec6414970b41ba42c1 /eclass
parentRemove old (diff)
downloadgentoo-2-495262d0ea449ac0370ca1c4565b35f4cad4d3e9.tar.gz
gentoo-2-495262d0ea449ac0370ca1c4565b35f4cad4d3e9.tar.bz2
gentoo-2-495262d0ea449ac0370ca1c4565b35f4cad4d3e9.zip
prune_libtool_files(): fix removing symlinked .la files.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/eutils.eclass13
2 files changed, 13 insertions, 5 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 355f6b1b24f1..9b0cfdda371f 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.435 2012/10/11 10:51:41 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.436 2012/10/11 16:50:53 mgorny Exp $
+
+ 11 Oct 2012; Michał Górny <mgorny@gentoo.org> eutils.eclass:
+ prune_libtool_files(): fix removing symlinked .la files.
08 Oct 2012; Michał Górny <mgorny@gentoo.org> +autotools-multilib.eclass:
Introduce autotools-multilib, to simplify building multilib packages with
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"; }