From 2e2a935033fd8254f172db7c3c73b0b2837c74dd Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 12 Sep 2015 20:54:39 -0300 Subject: do nothing if not given any files in pkg.elpa or on command line --- debian/changelog | 7 +++++++ dh_elpa | 29 ++++++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index b8f4a2f..4aee4a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dh-elpa (0.0.8) unstable; urgency=medium + + * Skip binary packages with no files in their package.elpa file and or + on the command line. + + -- David Bremner Sat, 12 Sep 2015 20:54:05 -0300 + dh-elpa (0.0.7) unstable; urgency=medium * On package uninstall remove the non-emacs-lisp symlinks as well diff --git a/dh_elpa b/dh_elpa index c84f94c..f622442 100755 --- a/dh_elpa +++ b/dh_elpa @@ -108,24 +108,12 @@ if ($dh{BYTECOMPILE}) { $elpadir=$dhelpadir; } +PACKAGE: foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); my $file=pkgfile($package,"elpa"); - if ($dh{BYTECOMPILE}) { - maybe_install_helper($package,'compat','0644'); - maybe_install_helper($package,'install','0755'); - maybe_install_helper($package,'remove','0755'); - - if (! $dh{NOSCRIPTS}) { - autoscript($package,"postinst","postinst-emacsen", - "s/#PACKAGE#/$package/"); - autoscript($package,"prerm","prerm-emacsen", - "s/#PACKAGE#/$package/"); - } - } - my $elpapkg=$package; # TODO do this more sanely or at least allow an override $elpapkg =~ s/^elpa-//; @@ -146,6 +134,21 @@ foreach my $package (@{$dh{DOPACKAGES}}) { push @files, @ARGV; } + next PACKAGE if (scalar(@files) == 0); + + if ($dh{BYTECOMPILE}) { + maybe_install_helper($package,'compat','0644'); + maybe_install_helper($package,'install','0755'); + maybe_install_helper($package,'remove','0755'); + + if (! $dh{NOSCRIPTS}) { + autoscript($package,"postinst","postinst-emacsen", + "s/#PACKAGE#/$package/"); + autoscript($package,"prerm","prerm-emacsen", + "s/#PACKAGE#/$package/"); + } + } + my $pkg_file; if (scalar(@files) == 1) { $pkg_file=$files[0]; -- cgit v1.2.3