Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] prune_libtool_files(): go into .a removal only when .a exists.
Date: Fri, 15 Jun 2012 13:32:17
Message-Id: 1339767138-14784-1-git-send-email-mgorny@gentoo.org
1 It is a little confusing when the function reports .a removal when no
2 such file exists. Also, explain why the file is removed.
3 ---
4 eclass/eutils.eclass | 6 ++++--
5 1 file changed, 4 insertions(+), 2 deletions(-)
6
7 diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
8 index 116f7bc..931d97d 100644
9 --- a/eclass/eutils.eclass
10 +++ b/eclass/eutils.eclass
11 @@ -1438,8 +1438,10 @@ prune_libtool_files() {
12
13 # Remove static libs we're not supposed to link against.
14 if grep -q '^shouldnotlink=yes$' "${f}"; then
15 - einfo "Removing unnecessary ${archivefile#${D%/}}"
16 - rm -f "${archivefile}"
17 + if [[ -f ${archivefile} ]]; then
18 + einfo "Removing unnecessary ${archivefile#${D%/}} (static plugin)"
19 + rm -f "${archivefile}"
20 + fi
21
22 # The .la file may be used by a module loader, so avoid removing it
23 # unless explicitly requested.
24 --
25 1.7.10.2

Replies