Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47336 - Show daemon services that are affected by an emerge.
Summary: Show daemon services that are affected by an emerge.
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-09 05:45 UTC by Tim Redman
Modified: 2007-06-05 16:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Redman 2004-04-09 05:45:26 UTC
There should be an option to show, at the end of a complete emerge, all of the daemons/services/super servers/etc. affected, so that the admin knows which ones to restart, as opposed to bouncing the entire server.  The option could possibly look for one or more of the following conditions:

1. If there is a file from the package being placed in /etc/init.d (such as samba, *cron, et al)
2. If there is a file from the package being placed in /etc/xinetd.d (such as swat, *ftpd, et al; also, I only know about xinetd, I'm not sure how inetd does this)
3. If there is a dependency or reverse dependency of the package that satisfies #1 or #2 (such as mod_php depending on apache, or openssl reverse depending on openssh)

This functionality could be particularly useful during large emerges, where updates are done infrequently.  Of course, because anything such as a kernel source merge would require a reboot, the function should probably indicate this as well.

The only holdup I can think of is that, to my knowledge, there really isn't a good way to do reverse dependency lookups in portage without slowing down the emerge considerably, though I may be wrong here.  I'm not a portage developer.



Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Tim Redman 2004-04-09 05:47:41 UTC
As a side note to #1, it may be useful to only show a service requiring a restart if the service is set up in the current runlevel.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2005-02-28 00:32:34 UTC
This requires ebuilds to export new metadata/variables to portage indicating what must be restarted...
thoughts on how to do this?  a comprehensive framework for it?
Comment 3 Tim Redman 2005-03-01 17:12:23 UTC
I'm not entirely certain how ebuilds work, and even greener with Python, but as I gather, more recent versions use a hierarchy-type class setup to derive attributes.  I would think that adding functionality to one of the high-level classes would be the way to do it, possibly by outputting the package name (for every one that dumps a file into /etc/init.d or /etc/xinetd.d) to a temporary file at the end of each merge, and then during emerge wrapup, displaying those file names as "Restart Recommended" services.

As far as checking dependencies, that might be a little tougher, and would possibly slow down the emerge slightly, or even significantly, as dependencies are looked up.

Along these same lines, you could probably send all output of einfo commands to a similar file for output at the end of the emerge.  I know that request has been brought up in other threads/bugs, and it seems like a way to kill two birds with one stone.

Admittedly, it is a "batch-file" approach to the method, but one possible solution nonetheless.

Tim
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 10:44:59 UTC
No clue why this was marked as NEEDINFO
Comment 5 Zac Medico gentoo-dev 2007-01-11 18:38:49 UTC
It seems like this would require some type of integration with baselayout since that handles starting/stopping of services.  The implementation of this type of feature is probably best discussed on the gentoo-dev mailing list.
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2007-06-05 16:51:33 UTC
Hmm, a simplified version of the original proposal could check rc-status for all files installed into /etc/init.d, but might cause weirdness due to CONFIG_PROTECT. I think elog messages can work for this, work right now, don't need a new PMS chapter and can handle special cases better.