From 30ffe9ba78d89d1244acf77289c5a231670aa436 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Sat, 14 Apr 2018 18:02:10 +0300 Subject: Invoke runit-helper only if it is available --- debian/changelog | 7 +++++++ postrm-runit | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b405140..aef4f18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dh-runit (2.7.2) unstable; urgency=medium + + * Invoke runit-helper only if it is available. It ensures, that in + pathological case, when it isn't (piuparts), postrm script do not fail. + + -- Dmitry Bogatov Sat, 14 Apr 2018 17:58:58 +0300 + dh-runit (2.7.1) unstable; urgency=medium * Upload to unstable. diff --git a/postrm-runit b/postrm-runit index edd9ee7..a306688 100644 --- a/postrm-runit +++ b/postrm-runit @@ -1,7 +1,18 @@ # -*- shell-script -*- export NAME='#NAME#' -/lib/runit-helper/runit-helper postrm "$@" + +# Unfortunately, we can not assume, that bin:runit-helper package +# is installed at postrm stage. +# +# The only other option is embed whole runit-helper script here, +# into postrm script of -run package, but it would be like static +# linking, requiring rebuild of all reverse dependencies on every +# change of dh-runit. +if [ -x /lib/runit-helper/runit-helper ] ; then + /lib/runit-helper/runit-helper postrm "$@" +fi # Local Variables: # eval: (sh-set-shell "sh" t nil) # End: +# vim: ft=sh:sw=4 -- cgit v1.2.3