Hi! On Thu, 2015-01-15 at 12:11:33 +0100, Emmanuel Bourg wrote: > Could this be solved with a trigger in the ca-certificates-java package? > We change the postinst script [1] to do nothing if the JDK is not > installed (so it's executed on upgrades but not on the first install), > and we add a trigger executing the postinst script when the JDK is > installed. Would that work?
Assuming that ca-certificates-java is only useful if there's a JRE, then yeah I guess that would do it. If you go this route, please use the -noawait trigger variants to not create a trigger cycle. In any case, and just to clarify. The postinst would have code to setup the certs and the JAR. This could would be called from configure only if a JRE is available. And from triggered always. > [1] > https://sources.debian.net/src/ca-certificates-java/20140324/debian/postinst.in/ Having taken a look at that script, there's some issues that I've noticed: * Using «dpkg --print-architecture» in maintscripts is almost always wrong, in this case what you want is the architecture matching the JRE, so you should be doing a dpkg-query on that package instead. * dpkg-query has been available for a very long time, just assume it's there, no need to which it. * The indentation is a bit messed up. Thanks, Guillem -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org