fre 2015-12-11 klockan 16:58 +0100 skrev Markus Koschany:
> Hi,
> could you provide an example package where maven-debian-helper
> modifies
> files in your debian directory? What helper tools (dh, cdbs, pure
> debhelper) and compat level do you use?
> Thanks,
> Markus


When I converted my Debian Java packages from mvn-debian, I used dh.
All of them are affected by this issue:


So you can look at any one of them.

They all have a workaround implemented: there is a dummy
debian/mh_resolve_dependencies script that does either nothing or only
touches a debian/*.substvars file, and there is a
override_dh_auto_install rule that changes the PATH during the
dh_auto_install call so that the call to mh_resolve_dependencies gets
replaced with a call to this dummy script.

        PATH=$(CURDIR)/debian:$${PATH} dh_auto_install 

This way the packages work fine.

If the workaround is removed, then after you have run dpkg-buildpackage 
once, these files have been modified or overwritten:


and these files not present in the original source package have been


These changes are not reverted by debian/rules clean, so if you run
dpkg-buildpackage again the packages would be built using a different
set of rules than during the first build - which makes the packages

The debian/compat says "5", because this is what it was before I
converted the packages to use dh - and there were no indications from
lintian that this would not be sufficient. Changing the debian/compat
to "9" doesn't change anything - mh_resolve_dependencies is still
called during the build and the same breakage occurs.

In the code in /usr/share/perl5/Debian/Debhelper/Buildsystem/ -
which is installed by the maven-debian-helper package:

In the "sub install" the first $this->doit_in_builddir calls maven to
do the installation - this part you really want.

The very next line is another call to $this->doit_in_builddir which
calls mh_resolve_dependencies and is the one that brings havoc and

There are no conditionals in the code here that makes it possible to
have to call to maven without the call to mh_resolve_dependencies, so
there doesn't seem to be any why to make the breakage not happen except
for hacks like the one I used.

Removing the call to mh_resolve_dependencies would be a way to fix it:

$ diff -ur
---   2015-12-11 14:47:56.000000000 +0100
+++    2015-12-16 16:20:02.280000000 +0100
@@ -108,11 +108,7 @@
-       $this->doit_in_builddir("mh_resolve_dependencies", "--non-interactive",
-               "--offline", "-p$this->{package}", @resolvedep_args);
        if ($this->{doc_package}) {
-               doit("cp","debian/$this->{package}.substvars",
-                       "debian/$this->{doc_package}.substvars");
                # clean up generated docs
                $this->doit_in_builddir("rm", "-f", "target/apidocs/*.sh",


Attachment: signature.asc
Description: This is a digitally signed message part

This is the maintainer address of Debian's Java team
Please use for discussions and questions.

Reply via email to