Hi, Since I haven't found any bugs about something similar, I've created a patch against portage-2.0.51-r3 which makes emerge wait for a keypress between install and merge, thus enabling one to stop a running daemon or do something else before files are merged to the live filesystem. This is triggered by using the -w (or --wait) option I am a noob to python, so please correct me if I made any mistakes, and I hope this patch gets accepted, because it's something I (and I can imagine others too) can really use. It wouldn't be the first time a server crashed on me because I didn't stop apache before updating and tried restarting it afterwards. Using this method, I don't have to stop apache before the compiling starts, which does make a big difference on production servers.
Created attachment 43780 [details, diff] The patch, apply it against portage-2.0.51-r3
Created attachment 43784 [details, diff] Patch again Fixed spelling mistake
Bug 4780
This can be done with binaries. emerge -b apache && /etc/init.d/apache2 stop && emerge -k apache && /etc/init.d/apache2 start Except with this way you can get a faster end result. It is advisable that you check any upgrade on a backup server first though.