Vincent Lefevre <vinc...@vinc17.net> writes:

> On 2013-05-13 12:02:31 +0100, Philip Hands wrote:
>> Vincent Lefevre <vinc...@vinc17.net> writes:
>> > My only use of Apache on some machine is because of sensord. But
>> > it may happen that in a few months, I would no longer need sensord
>> > and may remove the package. In this case, it would make sense to
>> > stop the Apache daemon automatically in order to free some resources.
>> > This would be dependencies between services...
>> 
>> If that's what you want it would make more sense to remove the apache
>> package to free even more resources.
>
> Yes, but similarly, there's no way to do this automatically.

[regarding automation, see the last couple of paragraphs below]

> There's also a problem that the man pages are in the package:
>
> $ dpkg -L apache2.2-common | grep /man/
> /usr/share/man/man8
> /usr/share/man/man8/apache2.8.gz
> /usr/share/man/man8/a2ensite.8.gz
> /usr/share/man/man8/apache2ctl.8.gz
> /usr/share/man/man8/a2enmod.8.gz
> /usr/share/man/man8/apachectl.8.gz
> /usr/share/man/man8/a2dissite.8.gz
> /usr/share/man/man8/a2dismod.8.gz

I suppose you could file a wishlist bug requesting a -doc package, but
I'd expect that to be marked wontfix, since the effort is probably not
justified by the size of audience that would appreciate such a change.

> There's no way to read this documentation first or keep it
> (this is useful if one wants to write/maintain a script that
> tests whether apache2 is available or not, for instance).

"no way" is a bit strong.

There are several ways of getting at the man pages without installing
apache.

If you're OK with it just being the manpage from current testing:

  http://man.cx/apache2(8)

If you must see the man page from a particular package:

  dget apache2.2-common
  mkdir -p ./tmp/apache2.2-common
  dpkg -X apache2.2-common_2.2.22-13_amd64.deb ./tmp/apache2.2-common
  
then if you want just brief access:

  man -l tmp/apache2.2-common/usr/share/man/man8/apache2.8.gz

or for longer term, create a ~/man dir, say, add that to your MANPATH
and move the man pages into place -- all possible without root access,
and certainly without risking running daemons or other side effects that
might arise from a mismatch between your expectations and reality.

Returning to your original point, it's not even as though it's hard to
disable an installed service on Debian.  I normally do that by stopping
the service and then adding something like this as the second line of
the init.d script:

  exit 0 # disabled rather than removed in order to keep the man pages around 
-- pgh 2013-05-23

which (particularly when committed to etckeeper with a similar message)
makes sure that the reason for deviating from the norm is clear to
others (and to my forgetful self) in future.

Since the init.d script is a conffile, you get reminded of your decision
to disable the service on every upgrade, which often saves a lot of head
scratching.

You seem to want the system to guess what's in your head, which may be
fine some of the time, but if you later install another package that,
unknown to you, has acquired some sort of web interface in the latest
version, then presumably that would result in the system guessing
(wrongly) that apache should be automatically re-enabled for you.

I can do without surprises like that.

Actually, I just installed sensord to see what you were getting at with
your claim that you wanted apache to stop running if you removed
sensord.  I see no plumbing in sensord that is intended to provoke
apache to run, or even help apache know that there's anything for it to
publish (so no apache.conf snippet, no automatically created directory
for the RRD images).  The postrm script only does an update-rc.d remove
on purge, and certainly does not have anything to remove RRD graphs, so
how apache is supposed to guess that you don't want to publish them any
more just because you removed a vaguely related package is a bit of a
puzzle.

What exactly are you expecting to happen in this sensord removal
scenario that is supposed to provoke Apache to automatically decide that
you don't need it running any more?

Cheers, Phi.
-- 
|)|  Philip Hands [+44 (0)20 8530 9560]    http://www.hands.com/
|-|  HANDS.COM Ltd.                    http://www.uk.debian.org/
|(|  10 Onslow Gardens, South Woodford, London  E18 1NE  ENGLAND

Attachment: pgpZJLdXWTYen.pgp
Description: PGP signature

Reply via email to