Gentoo Archives: gentoo-dev

From: Michael Orlitzky <michael@××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] prune_libtool_files(): go into .a removal only when .a exists.
Date: Fri, 15 Jun 2012 15:13:48
Message-Id: 4FDB50B0.6000303@orlitzky.com
In Reply to: [gentoo-dev] [PATCH] prune_libtool_files(): go into .a removal only when .a exists. by "Michał Górny"
On 06/15/12 09:32, Michał Górny wrote:
> It is a little confusing when the function reports .a removal when no > such file exists. Also, explain why the file is removed.
Why keep the "-f"?
> --- > eclass/eutils.eclass | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass > index 116f7bc..931d97d 100644 > --- a/eclass/eutils.eclass > +++ b/eclass/eutils.eclass > @@ -1438,8 +1438,10 @@ prune_libtool_files() { > > # Remove static libs we're not supposed to link against. > if grep -q '^shouldnotlink=yes$' "${f}"; then > - einfo "Removing unnecessary ${archivefile#${D%/}}" > - rm -f "${archivefile}" > + if [[ -f ${archivefile} ]]; then > + einfo "Removing unnecessary ${archivefile#${D%/}} (static plugin)" > + rm -f "${archivefile}" > + fi > > # The .la file may be used by a module loader, so avoid removing it > # unless explicitly requested.

Replies