Bug#709446: debhelper skips important commands in the jh_maven_repo_helper sequence

2013-05-23 Thread Wolodja Wentland
Package: debhelper
Version: 9.20130518
Severity: important

Dear Joey,

apparently the new functionality that allows debhelper to skip unused
commands is suffering from heuristics that are just a little too eager.

Specifically I am building a package [0] that uses maven-repo-helper to
install a jar into a local maven repository at /usr/share/maven-repo/ . The
relevant sequence is 
/usr/share/perl5/Debian/Debhelper/Sequence/jh_maven_repo_helper.pm
and contains:

--- snip ---
insert_after(jh_depends, mh_installpoms);
insert_after(mh_installpoms, mh_linkjars --skip-clean-poms);
insert_before(dh_clean, mh_clean);
--- snip ---

The command that is not being run with debhelper 9.20130518 is mh_linkjars
--skip-clear-poms, but it is executed successfully with debhelper 9.20120909
from testing. This *might* be due to the fact that the command is supposed to
run after a command that was introduced in the same sequence, but that is
simply a guess. Both commands (mh_{linkjars,installpoms}) do not have any
PROMISE in them and it is my understanding that commands without this should
never be removed from a sequence.

The build log contains:

--- debhelper 9.20130518 ---
 fakeroot debian/rules binary
dh binary --with javahelper --with jh_maven_repo_helper
   dh_testroot
   dh_prep
   dh_auto_install
   jh_installjavadoc
   dh_installdocs
   dh_installchangelogs
   dh_perl
   dh_link
   jh_installlibs
   jh_classpath
   jh_manifest
   jh_exec
   jh_depends
   mh_installpoms
   dh_compress
   dh_fixperms
   dh_installdeb
   dh_gencontrol
   dh_md5sums
   dh_builddeb
---

-- debhelper 9.20120909 --
 fakeroot debian/rules binary
dh binary --with javahelper --with jh_maven_repo_helper
   dh_testroot
   dh_prep
   dh_installdirs
   dh_auto_install
   dh_install
   jh_installjavadoc
   dh_installdocs
   dh_installchangelogs
   dh_installexamples
   dh_installman
   dh_installcatalogs
   dh_installcron
   dh_installdebconf
   dh_installemacsen
   dh_installifupdown
   dh_installinfo
   dh_installinit
   dh_installmenu
   dh_installmime
   dh_installmodules
   dh_installlogcheck
   dh_installlogrotate
   dh_installpam
   dh_installppp
   dh_installudev
   dh_installwm
   dh_installxfonts
   dh_installgsettings
   dh_bugfiles
   dh_ucf
   dh_lintian
   dh_gconf
   dh_icons
   dh_perl
   dh_usrlocal
   dh_link
   jh_installlibs
   jh_classpath
   jh_manifest
   jh_exec
   jh_depends
   mh_installpoms
   mh_linkjars --skip-clean-poms
   dh_compress
   dh_fixperms
   dh_installdeb
   dh_gencontrol
   dh_md5sums
   dh_builddeb
---

You can see that the new debhelper version successfully prunes a number of
commands that do not have to be run, but unfortunately mh_linkjars
--skip-clean-poms is one of them, which renders maven-repo-helper unusable
with the new debhelper in this case.

[0] https://mentors.debian.net/package/robert-hooke

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf-8, LC_CTYPE=en_GB.utf-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages debhelper depends on:
ii  binutils2.22-8
ii  dpkg1.16.10
ii  dpkg-dev1.16.10
ii  file1:5.14-2
ii  html2text   1.3.2a-15
ii  man-db  2.6.3-6
ii  perl5.14.2-21
ii  po-debconf  1.0.16+nmu2

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn  dh-make  none

-- no debconf information


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



Bug#709446: debhelper skips important commands in the jh_maven_repo_helper sequence

2013-05-23 Thread Wolodja Wentland
reassign 709446 maven-repo-helper
kthxbye

On Thu, May 23, 2013 at 12:27 +0100, Wolodja Wentland wrote:

 Specifically I am building a package [0] that uses maven-repo-helper to
 install a jar into a local maven repository at /usr/share/maven-repo/ . The
 relevant sequence is 
 /usr/share/perl5/Debian/Debhelper/Sequence/jh_maven_repo_helper.pm
 and contains:
 
 --- snip ---
 insert_after(jh_depends, mh_installpoms);
 insert_after(mh_installpoms, mh_linkjars --skip-clean-poms);
 insert_before(dh_clean, mh_clean);
 --- snip ---

After investigating the issue further it became apparent that the bug is in
maven-repo-helper that ships a broken debhelper sequence addon. After I change
/usr/share/perl5/Debian/Debhelper/Sequence/jh_maven_repo_helper.pm to:

--- snip ---
#!/usr/bin/perl

use warnings;
use strict;
use Debian::Debhelper::Dh_Lib;

# To use with javahelper
# dh $@ --with javahelper --with jh_mavenrepohelper

insert_after(jh_depends, mh_installpoms);
insert_after(mh_installpoms, mh_linkjars);
add_command_options(mh_linkjars, --skip-clean-poms);
insert_before(dh_clean, mh_clean);


1;
--- snip ---

mh_linkjars --skip-clean-poms is called as expected.
-- 
Wolodja deb...@babilen5.org

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC


signature.asc
Description: Digital signature


Bug#709446: debhelper skips important commands in the jh_maven_repo_helper sequence

2013-05-23 Thread Joey Hess
Wolodja Wentland wrote:
 The command that is not being run with debhelper 9.20130518 is mh_linkjars
 --skip-clear-poms, but it is executed successfully with debhelper 9.20120909
 from testing. This *might* be due to the fact that the command is supposed to
 run after a command that was introduced in the same sequence, but that is
 simply a guess. Both commands (mh_{linkjars,installpoms}) do not have any
 PROMISE in them and it is my understanding that commands without this should
 never be removed from a sequence.

For the record: dh never removes commands from a sequence. It just
detects when a command in a sequence promises it will do nothing, and
skips running it. Therefore this cannot possibly affect sequence addons.

-- 
see shy jo


signature.asc
Description: Digital signature