-1

This question is similar to this one.

When installing package updates, it's easy to find out package dependencies with apt-cache depends, however, I don't know how to find out what services may be affected. This is a significant problem in some circumstances; answers in that other question suggest that service restarts only take a few seconds, but that's not always true, for example a big MySQL instance may take several hours to shut down! Say there's an update to php5-curl. This is dependent on libapache2-mod-php5, which in turn depends on apache2-mpm-prefork. That package has 'apache2' on its provides list in aptitude show, so that tells me it's related to that service, but not necessarily that it needs a restart. I suspect that package dependencies alone are not sufficient to resolve this - I can imagine similar dependency chains that do not require a service restart (for example if the service loads such externals dynamically).

When I do an aptitude full-upgrade, I get nice output in "The following packages will be upgraded...". What I'm after would be a section in that output saying "The following services will be restarted...". How can I get that?

Synchro
  • 3,339
  • 6
  • 30
  • 40

2 Answers2

1

a way to find out definitively is to read the (pre/post) install scripts that come with the packages. maybe a grep "restart" is enough.

another way is to have a identical test system, where you could run your commands and see what happens.

jojoo
  • 444
  • 3
  • 10
0

you will have to create a script which looks updates for your system and like jojo said search for string "restart"