Bug#826734: mh_install doesn't work with dh-exec

Ondřej Surý ondrej at debian.org
Wed Jun 8 13:56:29 UTC 2016


My understanding from what algernon said in IRC, it's just a matter of
using standard debhelper interface to access to debian/<pkg>.poms file.

Perhaps a small dh/mh helper like this:

$ cat mh_readpoms
#!/usr/bin/perl -w
use strict;
use Debian::Debhelper::Dh_Lib;

my $package = $ARGV[0];

init();

if ($package) {
  my $file = pkgfile($package,"poms");
  if ($file) {
      my @poms=filedoublearray($file);
      foreach my $pom (@poms) {
  	print join(" ", @$pom) . "\n";
      }
  }
}

and do:

mh_readpoms $p | while read ...

in the main mh_install function.

This might just do the trick as filedoublearray call is needed for
dh-exec to kick-in.

Cheers,
-- 
Ondřej Surý <ondrej at sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver

On Wed, Jun 8, 2016, at 15:28, Emmanuel Bourg wrote:
> Le 8/06/2016 à 15:18, Ondřej Surý a écrit :
> 
> > java/lib/icepatch2-3.6.2.pom --artifact=java/lib/icepatch2-3.6.2.jar
> > java/lib/glacier2-3.6.2.pom --artifact=java/lib/glacier2-3.6.2.jar
> > java/lib/freeze-3.6.2.pom --artifact=java/lib/freeze-3.6.2.jar
> 
> Thank you for the example. mh_install supports wildcards for the
> --artifact parameter. You can write something like this:
> 
>     path/to/pom.xml --artifact=lib/foo-*.jar
> 
> But this won't work with your example since the path of the pom also
> contains the version number.
> 
> I'm not sure we can easily interface mh_install with dh-exec, but it
> should be possible to teach him to expand the environment variables.
> 
> Emmanuel Bourg
> 



More information about the pkg-java-maintainers mailing list