[debhelper-devel] [debhelper] 02/02: dh_installinit: Remove --no-restart-*on*-upgrade in compat 11
Niels Thykier
nthykier at moszumanska.debian.org
Mon Apr 10 10:22:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 48d84f8a7300f92004fdc1daf09dbd1f5a5d2d05
Author: Niels Thykier <niels at thykier.net>
Date: Mon Apr 10 10:21:10 2017 +0000
dh_installinit: Remove --no-restart-*on*-upgrade in compat 11
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debhelper.pod | 5 +++++
debian/changelog | 5 +++++
dh_installinit | 19 +++++++++++++++++--
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/debhelper.pod b/debhelper.pod
index 8a2c96c..b8e02a2 100644
--- a/debhelper.pod
+++ b/debhelper.pod
@@ -644,6 +644,11 @@ The B<--list-missing> and B<--fail-missing> in B<dh_install> has been
removed. Please use B<dh_missing> and its corresponding options,
which can also see the files installed by other helpers.
+=item -
+
+The B<--no-restart-on-upgrade> option in dh_installinit has been removed.
+Please use the new name B<--no-stop-on-upgrade>
+
=back
=back
diff --git a/debian/changelog b/debian/changelog
index bb4f800..313bd3f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,11 @@ debhelper (10.3) UNRELEASED; urgency=medium
* dh_installinit: Clarify that it might make sense to skip dh_installinit
for a package if it provides a systemd service but no sysvinit file.
(Closes: #800043)
+ * dh_installinit: Deprecate --no-restart-on-upgrade in favor of the new
+ name --no-stop-on-upgrade, which does the same thing but is less
+ likely to be confused with --no-restart-after-upgrade and is more
+ descriptive of what it actually does. Thanks to Simon McVittie and
+ Michael Biebl for the help. (Closes: #837528)
[ Steven Chamberlain ]
* When cross-compiling for GNU/kFreeBSD host systems, set
diff --git a/dh_installinit b/dh_installinit
index 752ad26..cdad41d 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -109,7 +109,18 @@ script.
=item B<-r>, B<--no-stop-on-upgrade>, B<--no-restart-on-upgrade>
-Do not stop init script on upgrade.
+Do not stop init script on upgrade. This has the side-effect of not
+restarting the service as a part of the upgrade.
+
+If you want to restart the service with minimal downtime, please use
+B<--restart-after-upgrade> (default in compat 10 or later). If you want
+the service to be restarted but be stopped during the upgrade, then please
+use B<--no-restart-after-upgrade> (note the "after-upgrade").
+
+Note that the B<--no-restart-on-upgrade> alias is deprecated and will
+be removed in compat 11. This is to avoid confusion with the
+B<--no-restart-after-upgrade> option. The B<--no-stop-on-upgrade>
+variant was introduced in debhelper 10.2 (included in Debian stretch).
=item B<--no-start>
@@ -175,7 +186,11 @@ $dh{RESTART_AFTER_UPGRADE} = 1 if not compat(9);
init(options => {
"r" => \$dh{R_FLAG},
'no-stop-on-upgrade' => \$dh{R_FLAG},
- "no-restart-on-upgrade" => \$dh{R_FLAG},
+ "no-restart-on-upgrade" => sub {
+ $dh{R_FLAG} = 1;
+ deprecated_functionality("--no-restart-on-upgrade has been renamed to --no-stop-on-upgrade",
+ 11);
+ },
"no-start" => \$dh{NO_START},
"R|restart-after-upgrade!" => \$dh{RESTART_AFTER_UPGRADE},
"init-script=s" => \$dh{INIT_SCRIPT},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list