Package: debhelper
Version: 9.20120419
Severity: wishlist

CASE STUDY
----------

Lintian reports missing-classpath problem for libswirl-java

    
http://lintian.debian.org/maintainer/[email protected]#libswirl-java

    http://lintian.debian.org/tags/missing-classpath.html

    "None of the jar files contained in the package declare a Class-Path in
    their manifest, but the package depends on at least one java library.
    That means that either the dependency is not needed or at least one of
    the JARs should include a classpath..."

This s due to ANT building the JAR file with default contents of

    $ unzip -qc swirl.jar META-INF/MANIFEST.MF
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.8.2
    Created-By: 1.6.0_24-b24 (Sun Microsystems Inc.)

>From Lintian point of view, it expects (debian/control)

    Package: libswirl-java
    Depends: ${misc:Depends}, libjdom1-java

thus requiring the manifest to read:

    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.8.2
    Created-By: 1.6.0_24-b24 (Sun Microsystems Inc.)
  + Class-Patch: /usr/share/java/jdom1.jar

SOLUTION

There is no easy way to manipulate auto-generated manifest files. Therefore
a script:

    dh_javajarmanifest

would help to deal with JARs and make them Debian compliant.

IMPLEMENTATION

Program dh_javajar would read debian/<package>.jarmanifest file whose
syntax would be

    <command> <string>

Where commands would be:

    new     Add new header to the end, or replace existing header
    del     Delete header, or do nothing if no header exists

An example (for the USE CASE):

    #  debian/libswirl-java.jarmanifest
    new Class-Path: /usr/share/java/jdom1.jar

Jari



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to