Package: maven-debian-helper
Version: 2.2.7
Severity: normal

Dear Maintainer,

In order to achieve a successful build, it is sometimes it is necessary to 
modify a pom.xml file in a way which cannot be achieved purely through using 
mh_patchpoms. In these cases, one falls back on using quilt as the standard 
mechanism for patching an upstream source. See for example:

https://anonscm.debian.org/cgit/pkg-java/dropwizard-metrics.git/tree/debian/patches/drop-graphite-rabbitmq-support.patch?id=f2a998aeeaa7e4e3f209a37cc79fe0a168281561

However, this now means that there are two mechanisms modifying the same file, 
quilt and mh_(un)patchpom, which can be confusing.

In particular, I would normally expect running debuild followed by debclean in 
an unpacked source package to build the package and then return the package to 
its original state. However, this is not what happens at the moment:

Sequence during debuild:

dpkg-source --before-build dropwizard-metrics
  (This applies the quilt patch to the original pom.xml)
mh_unpatchpoms -plibdropwizard-metrics-java
  (This shouldn't do anything, as there are no mh patched poms at this stage)
mh_patchpoms -plibdropwizard-metrics-java --debian-build --keep-pom-version 
--maven-repo=/home/mans0954/src/pkg-java/dropwizard-metrics/debian/maven-repo
  (This copies the quilt patched pom.xml to pom.xml.save and then writes a mh 
modified pom to pom.xml)
dpkg-source --after-build dropwizard-metrics
  (This then attempts to unapply the quilt patch from the mh modified pom.xml, 
but not pom.xml.save.)

Sequence during debclean

mh_unpatchpoms -plibdropwizard-metrics-java
  (This moves pom.xml.save to pom.xml, so that pom.xml no longer has the mh 
modifications, but still has the quilt patch applied. Running "quilt pop -a" 
has no effect as quilt has previously unapplied the patch to the mh-modified 
pom.xml which has just been over-written))

This problem, workarounds and possible fixes have been discussed on the 
debian-java list, and a fix proposed:

https://lists.debian.org/debian-java/2017/11/msg00030.html

Christopher Hoskin

__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to