Patchwork [02/17] connman: Package unpackaged .la file

login
register
mail settings
Submitter Richard Purdie
Date July 5, 2011, 10:51 p.m.
Message ID <d0bae3ed1b9aead05a353ade871e71bf5b1c01b1.1309906154.git.richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/7033/
State New, archived
Headers show

Comments

Richard Purdie - July 5, 2011, 10:51 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-connectivity/connman/connman.inc     |    2 ++
 meta/recipes-connectivity/connman/connman_0.75.bb |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)
Phil Blundell - July 6, 2011, 9:14 a.m.
On Tue, 2011-07-05 at 23:51 +0100, Richard Purdie wrote:
> +FILES_${PN}-dev += "${libdir}/connman/plugins/*.la"

Actually, in this specific case, I think adding *.la to FILES is the
wrong thing to do.  The DSOs in question are plugins, not libraries, and
nobody is ever going to link against them.  So the corresponding .la
files (and the .so symlinks, if those are also getting created) really
are just dross and should be deleted.

p.
Richard Purdie - July 6, 2011, 10:34 a.m.
On Wed, 2011-07-06 at 10:14 +0100, Phil Blundell wrote:
> On Tue, 2011-07-05 at 23:51 +0100, Richard Purdie wrote:
> > +FILES_${PN}-dev += "${libdir}/connman/plugins/*.la"
> 
> Actually, in this specific case, I think adding *.la to FILES is the
> wrong thing to do.  The DSOs in question are plugins, not libraries, and
> nobody is ever going to link against them.  So the corresponding .la
> files (and the .so symlinks, if those are also getting created) really
> are just dross and should be deleted.

Ever is a strong word, you might want to wrap and customise a plugin or
something :)

Seriously, I'm in two minds on this and had patches both ways. In the
end I decided it was less ugly to package them than have the metadata
covered in .la file deletions which would likely encourage people to
delete library .la files too and not see the subtle difference.

There are also rumours that some libltdl derived plugin modules use
the .la files under certain circumstances. I suspect connman doesn't use
libltdl but I didn't check. I also suspect that if it did need them, the
standard package would need to include them. Since it presumably works
as is, it therefore mustn't need them. Its a useful thing to keep in
mind though since plugins doesn't necessarily mean no need for the .la
files (imagemagik was software that used the .la files for plugins
iirc).

Cheers,

Richard

Patch

diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index ccff573..916f8ad 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -38,6 +38,8 @@  FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
 FILES_${PN}-dbg += "${libdir}/connman/plugins/.debug \
                     ${libdir}/connman/scripts/.debug"
 
+FILES_${PN}-dev += "${libdir}/connman/plugins/*.la"
+
 python populate_packages_prepend() {
 	depmap = dict( wifi="wpa-supplicant", bluetooth="bluez4", ofono="ofono" )
 	packages = []
diff --git a/meta/recipes-connectivity/connman/connman_0.75.bb b/meta/recipes-connectivity/connman/connman_0.75.bb
index 75ef5b5..aeff439 100644
--- a/meta/recipes-connectivity/connman/connman_0.75.bb
+++ b/meta/recipes-connectivity/connman/connman_0.75.bb
@@ -1,5 +1,5 @@ 
 require connman.inc
-PR = "r0"
+PR = "r1"
 
 EXTRA_OECONF += "\
   ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \