Hi,

Jonas Smedegaard wrote:

> I have too much on my mind ATM to wrap my head around this, so just a 
> quick comment: /usr/share/doc/build-essential/list is wrong to use

Yep.  I should have said "/usr/share/build-essential/list".

[...]
> Could you perhaps be persuaded to propose a patch?

Gladly.  But first, I should figure out what d-shlibmove is for.

Based on the manpage and source, it seems that the d-shlibmove command
called in the ghostscript packaging is meant to act, roughly speaking,
like

        dh_install -plibgs-dev debian/tmp/usr/include/* usr/include
        dh_install -plibgs-dev debian/tmp/usr/lib/libgs.a usr/lib
        dh_install -plibgs-dev debian/tmp/usr/lib/libgs.so usr/lib
        dh_install -plibgs9 debian/tmp/usr/lib/libgs.so.9 usr/lib
        dh_install -plibgs9 debian/tmp/usr/lib/libgs.so.9.02 usr/lib
        d-devlibdeps debian/libgs9.substvars debian/tmp/usr/lib/libgs.so

and then check that debian/control complies with the shared library
policy.  Very neat.  In turn, d-devlibdeps populates the
devlibs:Depends substvar for libgs-dev to use like so:

        Depends: ${devlibs:Depends}

It works by parsing DT_NEEDED entries in the DSO, applying some
substitutions to use unversioned package names where possible, leave
out build-essential packages, and so on.

But that seems strange: shouldn't such dependencies only be needed for
static linking or when headers of one library include headers from
another?  Using the ghostscript API does not require installing the
development libraries for cups, fontconfig, gnutls, lcms, and so on.
_Maybe_ they ought to be in Recommends or Suggests for static linking.

If such a Suggests line is wanted, I think a good way to populate it
would be to look at the Build-Depends-Package line in symbols files
instead of the current approach of maintaining a list of exceptions
and otherwise assuming the soname is the same as the name of the
package.  As a double-check, it should be sufficient to ask dpkg if
the package exists --- all such development packages are already
installed at build time because they are used to build the DSO.  I'd
be happy to work on this if the design sounds sane.

A simple quick fix would be to teach d-shlibmove an option which
ghostscript could use to avoid the procedure altogether.  Like this,
roughly (untested).  I don't mind if someone comes up with a better
name for the option. ;-)

Signed-off-by: Jonathan Nieder <jrnie...@gmail.com>
---
 d-shlibmove      |    8 +++++++-
 d-shlibmove.1    |   10 ++++++++++
 debian/changelog |    6 ++++++
 3 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/d-shlibmove b/d-shlibmove
index 043e9f29..d6ef7588 100755
--- a/d-shlibmove
+++ b/d-shlibmove
@@ -96,6 +96,7 @@ TRANSITIONSUFFIX=
 DOIT=no
 DEVUNVERSIONED=no
 IGNORELIBDEP=no
+IGNOREDEVLIBDEP=no
 INCLUDELA=yes
 while [ -n "$1" ]; do
     case $1 in
@@ -147,6 +148,9 @@ while [ -n "$1" ]; do
        --ignorelibdep)
            IGNORELIBDEP=yes
            shift;;
+       --ignoredevlibdep)
+           IGNOREDEVLIBDEP=yes
+           shift;;
        --c102)
            TRANSITIONSUFFIX="c102"
            shift;;
@@ -200,7 +204,9 @@ if [ -n "${SHLIBSLOCALVER}" ]; then
     echo "echo \"${SONAMELIBNAME} ${SONAMEVERSION} ${PKGSHL} (>= 
${SHLIBSLOCALVER})\" >> debian/shlibs.local" >> "$execscript"
 fi
 
-d-devlibdeps "${OVERRIDE[@]/#/--override=}"  debian/"${PKGDEV}".substvars 
"${DEVLIB_TO_CHECK}"
+if ! [ "${IGNOREDEVLIBDEP}" = "yes" ]; then
+    d-devlibdeps "${OVERRIDE[@]/#/--override=}"  debian/"${PKGDEV}".substvars 
"${DEVLIB_TO_CHECK}"
+fi
 
 #do some definition for the file.
 echo "PKGDEV=${PKGDEV}" >> "${execscript}"
diff --git a/d-shlibmove.1 b/d-shlibmove.1
index 00687a67..2ee374b5 100644
--- a/d-shlibmove.1
+++ b/d-shlibmove.1
@@ -94,6 +94,16 @@ CDBS.
 Added in version 0.42
 
 .TP
+.B "--ignoredevlibdep"
+
+Do not call d-devlibdeps to populate ${devlibs:Depends}.  Useful when
+the library headers don't include headers from other libraries and
+the development library package is primarily meant to be used for
+dynamic linking.
+
+Added in version 0.47.1
+
+.TP
 .B "--c102"
 
 Add c102 suffix to package names, for C++ ABI transition.
diff --git a/debian/changelog b/debian/changelog
index 461b3ac7..dd23df27 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+d-shlibs (0.47.1) local; urgency=low
+
+  * Implement option --ignoredevlibdep. Closes: bug#636919.
+
+ -- Jonathan Nieder <jrnie...@gmail.com>  Sun, 07 Aug 2011 21:24:35 +0200
+
 d-shlibs (0.47) unstable; urgency=low
 
   * Fix typo in armel-specific ld-linux3-dev suppression.
-- 
1.7.6




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to