Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Michał Górny <mgorny@g.o>
Subject: Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Date: Tue, 13 Sep 2011 08:40:59 +0200
On Mon, 12 Sep 2011 17:10:49 -0500
Donnie Berkholz <dberkholz@g.o> wrote:

> On 23:58 Mon 12 Sep     , Michał Górny wrote:
> > On Mon, 12 Sep 2011 16:00:20 -0500
> > Donnie Berkholz <dberkholz@g.o> wrote:
> > > >  	local f
> > > >  	for f in $(find "${D}" -type f -name '*.la'); do
> > > >  		# Keep only .la files with shouldnotlink=yes -
> > > > likely plugins local shouldnotlink=$(sed -ne
> > > > '/^shouldnotlink=yes$/p' "${f}") if [[  "$1" == 'all' || -z
> > > > ${shouldnotlink} ]]; then
> > > > +			if [[ "$1" == 'only-not-required' ]];
> > > > then
> > > 
> > > Is there a case where one of those arguments might be $2 but you'd
> > > still want to run this?
> > 
> > Er? What are you referring to?
> 
> Two things.
> 
> 1. This is only reached if shouldnotlink is false. That means it's
> only the things that you are already assuming are plugins, right? If
> so, why is this even done?

That simply means that we're never removing .la files for plugins
(right now) because plugin loaders may need them with shared linking.
The other case are regular libraries where .la files are removed as
described above.

> 2. What happens if I call it with `remove_libtool_files all 
> only-not-required`? Nobody ever does any checking of the # of args.

Will add.

> > > > +				# remove .la files only
> > > > when .pc files provide the libs
> > > > +				# already or they don't give
> > > > any information
> > > > +				! has $(basename "${f}")
> > > > ${pc_libs} \
> > > > +						&& [[ -n
> > > > "$(sed -n \
> > > 
> > > The comment says "or" but I see an "and" here.
> > 
> > Because everything's negated here. Boolean magic :D.
> 
> OK, got it. Stop writing confusing logic. =P

It's confusing because of that 'continue', I guess ;P.

-- 
Best regards,
Michał Górny
Attachment:
signature.asc (PGP signature)
References:
[PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
-- Michał Górny
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
-- Donnie Berkholz
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
-- Michał Górny
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
-- Donnie Berkholz
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Next by thread:
[PATCH autotools-utils 1/9] Fix handling whitespace in filenames when looking for .la files.
Previous by date:
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Next by date:
Re: [gentoo-commits] gentoo-x86 commit in net-analyzer/wireshark: wireshark-1.6.2.ebuild ChangeLog wireshark-1.4.9.ebuild wireshark-1.4.7.ebuild wireshark-1.6.0_rc1.ebuild wireshark-1.4.4.ebuild wireshark-1.4.6-r1.ebuild


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.