[debhelper-devel] Bug#711755: Bug#711755: don't attempt to reload apache2 if it wasn't running before we started the upgrade

Steve Langasek vorlon at debian.org
Thu Aug 13 17:29:42 UTC 2015


On Thu, Aug 13, 2015 at 08:38:59AM +0200, Niels Thykier wrote:
> Control: tags -1 moreinfo

> On Sun, 13 Jul 2014 15:04:21 +0200 =?ISO-8859-15?Q?Arno_T=F6ll?=
> <arno at debian.org> wrote:

> > On 09.06.2013 14:33, jidanni at jidanni.org wrote:
> > > I'm telling you guys, not everybody runs apache2 24/7/365 days a year,
> > > so please double check if it was running first (before the upgrade
> > > started) before causing these error messages during upgrades!

> > technically, we do not but debhelper does.

> > We call dh_installinit as:

> > override_dh_installinit:
> >         dh_installinit --restart-after-upgrade --error-handler=true --
> > defaults 91 09

> > [...]

> > I think, debhelper should check through invoke-rc.d status - when
> > available - before (re-)starting a daemon unconditionally.

> > This is arguably a behavior which should be addressed on a higher level
> > for all packages that handle init scripts through dh_installinit. If
> > debhelper maintainers disagree, please assign back and we may workaround
> > that particular behavior for our package only, even though that sounds
> > wrong to me.

> Thanks for the suggestion.

> There is just one major caveat: The "status" command is "optional"[1].
> If we were to implement this "status" check in debhelper, up to 300
> packages would now fail to restart services on upgrades.

> To be honest, I am not sure how to deal with this sanely in debhelper
> without breaking packages.  At best, I could add a
> "init-has-working-status" option to dh_installinit.

debhelper should not make any changes here.  There is a well-defined policy
for how you prevent daemons from running on the system - you use
'update-rc.d disable', or you configure 'policy-rc.d' to taste.

For debhelper to do anything else would be a *regression* and while not a
literal violation of policy, it would certainly be a violation of the intent
and of 20 years of Debian best practice.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org




More information about the debhelper-devel mailing list