Package: exiv2
Version: 0.21.1-1
Severity: important
Tags: patch
User: vor...@debian.org
Usertags: multiarch

Hi folks,

The libexiv2-dev package includes a .la file that has a non-null
dependency_libs field.  This means that when any other libtool-using
software builds against libexiv2 in Debian, it has to traverse the .la files
for all the other libraries listed here; and in some cases the
reverse-dependencies pick up unnecessary library dependencies as a result.

Debian Policy 10.2 recommends blanking out this dependency_libs field from
.la files that you install:

     Packages that use `libtool' to create and install their shared
     libraries install a file containing additional metadata (ending in
     `.la') alongside the library.  For public libraries intended for use
     by other packages, these files normally should not be included in the
     Debian package, since the information they include is not necessary to
     link with the shared library on Debian and can add unnecessary
     additional dependencies to other programs or libraries.[6] If the
     `.la' file is required for that library (if, for instance, it's loaded
     via `libltdl' in a way that requires that meta-information), the
     `dependency_libs' setting in the `.la' file should normally be set to
     the empty string.  If the shared library development package has
     historically included the `.la', it must be retained in the
     development package (with `dependency_libs' emptied) until all
     libraries that depend on it have removed or emptied `dependency_libs'
     in their `.la' files to prevent linking with those other libraries
     using `libtool' from failing.

This becomes a practical issue soon because of multiarch; once multiarch
lands in the archive, libexpat, which has an .la file referenced by
libexiv2.la, will move directories, making packages fail to build if they
try to find /usr/lib/libexpat.la at build time.  So I would suggest applying
the attached patch to exiv2, before multiarch forces the issue.

This patch, by Fabrice Coutadeur <fabric...@ubuntu.com>, has already been
applied in Ubuntu, with the following changelog entry:

  * debian/rules: delete the content of dependency_libs in la file to avoid
    having to rebuild this package if the path of the libs changes. This fixes
    also FTBFS in packages that b-d on libexiv2-dev because of incorrect
    reference of libexpat.la. (LP: #737340)

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru exiv2-0.21.1/debian/rules exiv2-0.21.1/debian/rules
--- exiv2-0.21.1/debian/rules	2011-02-14 16:42:25.000000000 -0800
+++ exiv2-0.21.1/debian/rules	2011-03-18 00:43:00.000000000 -0700
@@ -17,6 +17,12 @@
 	[ ! -f Makefile ] || $(MAKE) doc
 	dh_install --list-missing
 	find $(CURDIR)/debian -type f -name exiv2 | xargs /usr/bin/chrpath -d
+	# Drop content of dependency_libs to avoid having to recompile exiv2
+	# if the path of the libs that appear there changes
+	for file in $(CURDIR)/debian/libexiv2-dev/usr/lib/*.la; do \
+		sed -i "/dependency_libs/ s/'.*'/''/" $$file ; \
+		done
+
 
 override_dh_installdocs:
 	dh_installdocs -A -Xcmd.txt -XMakefile -Xtemplates -XChangeLog
_______________________________________________
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-kde-extras

Reply via email to