* [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them
@ 2012-10-17 13:42 Phil Blundell
2012-10-17 13:47 ` Burton, Ross
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Phil Blundell @ 2012-10-17 13:42 UTC (permalink / raw)
To: openembedded-core
It's not obvious that libtool's .la files serve any very useful purpose
on a modern system and they can be positively vexatious under some
circumstances. Make installation of this stuff conditional on the new
"libtool-garbage" flag in DISTRO_FEATURES and backfill it for existing
distros.
Also, perform at least a perfunctory cleaning of unified build directories
when reconfiguring since many packages don't have the right dependency
rules to cause a recompile when this happens. Making distclean is not
practical since many packages either don't support it at all, or remove
too much (e.g. polkit blows away its documentation which causes the
subsequent license check to fail).
Signed-off-by: Phil Blundell <pb@pbcl.net>
---
meta/classes/autotools.bbclass | 16 ++++++++++++----
meta/conf/bitbake.conf | 2 +-
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index e4e034b..adb2bbf 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -93,10 +93,15 @@ CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
autotools_preconfigure() {
if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
- if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
- echo "Previously configured separate build directory detected, cleaning ${B}"
- rm -rf ${B}
- mkdir ${B}
+ if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" ]; then
+ if [ "${S}" != "${B}" ]; then
+ echo "Previously configured separate build directory detected, cleaning ${B}"
+ rm -rf ${B}
+ mkdir ${B}
+ else
+ echo "Previously configured source directory detected, cleaning ${S} (slightly)"
+ oe_runmake clean
+ fi
fi
fi
}
@@ -201,6 +206,9 @@ autotools_do_install() {
if [ -e "${D}${infodir}/dir" ]; then
rm -f ${D}${infodir}/dir
fi
+ if ${@base_contains('DISTRO_FEATURES', 'libtool-garbage', 'false', 'true', d)}; then
+ find ${D} -name "*.la" -exec rm \{} \;
+ fi
}
inherit siteconfig
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 1ad6ee6..4ad3722 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -728,7 +728,7 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
-DISTRO_FEATURES_BACKFILL = "pulseaudio update-modules"
+DISTRO_FEATURES_BACKFILL = "pulseaudio update-modules libtool-garbage"
DISTRO_FEATURES_append = "${@oe.utils.features_backfill("DISTRO_FEATURES",d)}"
MACHINE_FEATURES_BACKFILL = "rtc"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them
2012-10-17 13:42 [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them Phil Blundell
@ 2012-10-17 13:47 ` Burton, Ross
2012-10-17 16:38 ` Phil Blundell
2012-10-17 13:51 ` Paul Eggleton
2012-11-28 15:09 ` Burton, Ross
2 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2012-10-17 13:47 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On 17 October 2012 14:42, Phil Blundell <philb@gnu.org> wrote:
> It's not obvious that libtool's .la files serve any very useful purpose
> on a modern system and they can be positively vexatious under some
> circumstances. Make installation of this stuff conditional on the new
> "libtool-garbage" flag in DISTRO_FEATURES and backfill it for existing
> distros.
Hooray!
> Also, perform at least a perfunctory cleaning of unified build directories
> when reconfiguring since many packages don't have the right dependency
> rules to cause a recompile when this happens. Making distclean is not
> practical since many packages either don't support it at all, or remove
> too much (e.g. polkit blows away its documentation which causes the
> subsequent license check to fail).
Would you consider splitting this into a separate commit?
Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them
2012-10-17 13:47 ` Burton, Ross
@ 2012-10-17 16:38 ` Phil Blundell
0 siblings, 0 replies; 6+ messages in thread
From: Phil Blundell @ 2012-10-17 16:38 UTC (permalink / raw)
To: Burton, Ross; +Cc: openembedded-core
On Wed, 2012-10-17 at 14:47 +0100, Burton, Ross wrote:
> On 17 October 2012 14:42, Phil Blundell <philb@gnu.org> wrote:
> > Also, perform at least a perfunctory cleaning of unified build directories
> > when reconfiguring since many packages don't have the right dependency
> > rules to cause a recompile when this happens. Making distclean is not
> > practical since many packages either don't support it at all, or remove
> > too much (e.g. polkit blows away its documentation which causes the
> > subsequent license check to fail).
>
> Would you consider splitting this into a separate commit?
Yes, no problem.
p.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them
2012-10-17 13:42 [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them Phil Blundell
2012-10-17 13:47 ` Burton, Ross
@ 2012-10-17 13:51 ` Paul Eggleton
2012-11-28 15:09 ` Burton, Ross
2 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-10-17 13:51 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On Wednesday 17 October 2012 14:42:03 Phil Blundell wrote:
> It's not obvious that libtool's .la files serve any very useful purpose
> on a modern system and they can be positively vexatious under some
> circumstances. Make installation of this stuff conditional on the new
> "libtool-garbage" flag in DISTRO_FEATURES and backfill it for existing
Could we perhaps have a less inflammatory feature name? Since this is going to
be set in stone after all...
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them
2012-10-17 13:42 [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them Phil Blundell
2012-10-17 13:47 ` Burton, Ross
2012-10-17 13:51 ` Paul Eggleton
@ 2012-11-28 15:09 ` Burton, Ross
2012-11-28 15:15 ` Phil Blundell
2 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2012-11-28 15:09 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On 17 October 2012 14:42, Phil Blundell <philb@gnu.org> wrote:
> It's not obvious that libtool's .la files serve any very useful purpose
> on a modern system and they can be positively vexatious under some
> circumstances. Make installation of this stuff conditional on the new
> "libtool-garbage" flag in DISTRO_FEATURES and backfill it for existing
> distros.
I never saw a patch with a less inflammatory (albeit accurate) name.
Libtool has been causing me pain again so I'd love to turn this on.
Is this still good for merging with a different name (libtool-la?)
Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them
2012-11-28 15:09 ` Burton, Ross
@ 2012-11-28 15:15 ` Phil Blundell
0 siblings, 0 replies; 6+ messages in thread
From: Phil Blundell @ 2012-11-28 15:15 UTC (permalink / raw)
To: Burton, Ross; +Cc: openembedded-core
On Wed, 2012-11-28 at 15:09 +0000, Burton, Ross wrote:
> On 17 October 2012 14:42, Phil Blundell <philb@gnu.org> wrote:
> > It's not obvious that libtool's .la files serve any very useful purpose
> > on a modern system and they can be positively vexatious under some
> > circumstances. Make installation of this stuff conditional on the new
> > "libtool-garbage" flag in DISTRO_FEATURES and backfill it for existing
> > distros.
>
> I never saw a patch with a less inflammatory (albeit accurate) name.
> Libtool has been causing me pain again so I'd love to turn this on.
> Is this still good for merging with a different name (libtool-la?)
The only minor roadblock to this is that RP wasn't very keen on the
clean-on-reconfigure patch when I submitted that one independently, see:
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-October/031449.html
Without some equivalent of that thing, turning off .la files in an
existing build tree will cause you to start getting failures. I guess
we could just accept that as an occupational hazard, and say that people
who turn off libtool-la need to take care of the necessary cleaning for
themselves.
Other than that, yes, I would also like to see this patch get merged.
p.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-28 15:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 13:42 [RFC PATCH] autotools: Don't install .la files if the distro doesn't want them Phil Blundell
2012-10-17 13:47 ` Burton, Ross
2012-10-17 16:38 ` Phil Blundell
2012-10-17 13:51 ` Paul Eggleton
2012-11-28 15:09 ` Burton, Ross
2012-11-28 15:15 ` Phil Blundell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox