Jorge Manuel B. S. Vicetto | 31 Oct 05:25 2010
Picon

Gentoo's plan to remove .la files


Hi.

As decided in the last council's meeting, following the recent
discussions about .la files removal, I'm sending an email to this list
with a proposal for a plan to address this issue.

My proposal for the plan is the following:

1. Add a function to eutils to deal with the removal of the .la files.

delete_libtool_archives() { find "${ <at> :$D}" -name '*.la' -delete }

That function was suggested by Diego, but Arfrever has argued that we
should replace : with - as '"${ <at> :$D}" expands to a subarray containing
elements starting with element with index $D (where element 0 is $0)'.
The point in having this function in eutils is to ensure we use a
consistent way to address the .la files. This will also make it much
easier to adapt or review this function if needed.

2. Get a consensus about the wording of when it's appropriate and how
it's appropriate to remove the .la files

As agreed in the meeting, as a first draft, we have that "the motion is
to drop la files, when appropriate, through the use of a function in
eutils that will only be called if the static-libs use flag is not set
or unless the package relies on pkg-config".
In the meantime there were some concerns raised about some prefix arches
and therefore there's a suggestion we use a hidden variable (not to be
set by users) to control the removal of the files so that we can "mask"
running the function on any profile where we can't drop the .la files.

3. Add a page to the QA project space (unless they're not interested)
about la files and how to deal with them

I think we can ask Diego to use large parts of his blog posts and charts
about .la files[1], [2], [3], [4] as a source for the document. We can
also add some basic info from the autobook[5], [6]. The goal would be to
have a document similar to our own --as-needed guide [7] and to other
distributions[8], [9].
Anyone wishes to volunteer for this task?
QA would such a document be welcomed in your project space?

4. Add the news item about pending .la files removal, pointing to 3 and
with instructions to run lafilefixer and explaining how portage-2.1.9*
addresses this issue.

We can base the news item in the existing proposal for this[10].

5. Get portage-2.1.9* marked stable.

As this portage version will fix the contents of the .la files when
installing them, it will prevent the trouble caused by the hard-coded
lib references - for all the .la files that will still need to be installed.
One issue that remains open to me, is whether there will be any control
over this feature. I was told the plan is to have it dependent on
FEATURES, which to me doesn't make much sense.

6. allow maintainers to work on .la files removal as they see fit

After we provide maintainers consistent tools to remove .la files,
create some good documentation about this, get a stable version of
portage that helps addressing the issue for newly installed packages
and warn users, maintainers are free to work on this as they can.

 [1] - http://blog.flameeyes.eu/2008/04/14/whatabout-those-la-files
 [2] -
http://blog.flameeyes.eu/2008/07/02/again-about-la-files-or-why-should-they-be-killed-off-sooner-rather-than-later
 [3] -
http://blog.flameeyes.eu/2009/07/06/identifying-pointless-la-files-for-plugins
 [4] -
http://blog.flameeyes.eu/2009/09/28/removing-la-files-for-dum-w-uncertain-people
 [5] - http://sources.redhat.com/autobook/autobook/autobook_11.html#SEC11
 [6] - http://sources.redhat.com/autobook/autobook/autobook_68.html#SEC68
 [7] - http://www.gentoo.org/proj/en/qa/asneeded.xml
 [8] - http://wiki.mandriva.com/en/Libtool_archives#shared_build
 [9] - http://wiki.mandriva.com/en/Overlinking
 [10] -
http://archives.gentoo.org/gentoo-dev/msg_c65fd55a78f1418178689df822a25638.xml

Please reply if you have any suggestions or warnings about this plan and
or any of the points.
I'm going to send one email for each point in this plan. Please send any
replies about the plan to this thread and to each of the points to the
respective threads.

--

-- 
Regards,

Jorge Vicetto (jmbsvicetto) - jmbsvicetto at gentoo dot org
Gentoo- forums / Userrel / Devrel / KDE / Elections / RelEng

Gmane