On Fri, 2009-12-11 at 07:16 -0600, Dale wrote: > Helmut Jarausch wrote: > > On 11 Dec, Alan McKinnon wrote: > > > >> On Friday 11 December 2009 11:11:41 Helmut Jarausch wrote: > >> > >>> Hi, > >>> > >>> I'm curious how portage solves its most difficult part (in my eyes). > >>> > >>> When installing a dynamic library (by "hand") I have often got an > >>> error messages if the corresponding library is currently in use. > >>> > >>> How does portage succeed anyway. > >>> (I have the suspicion that it does not succeed always, since sometimes > >>> only rebooting solves some very strange problems) > >>> > >>> How to replace fundamental X11-libaries on a system running X11 > >>> or even more suprising, how can I replace a running glibc ? > >>> > >>> Many thanks for enlightening me, > >>> Helmut. > >>> > >>> > >> Portage does nothing special, as dealing with this is a Unix thing. > >> > >> On Unix, the inode is the file, not the directory entry. If you want to > >> replace an open file, the system simply does it and updates the dentry to > >> point to a new inode. Any spp using the old file will continue to use it > >> as it > >> still has a handle to the inode. The inode is only fully deleted when the > >> last > >> app using it closes it > >> > >> If you update a library to a new version with an API break, the lib should > >> get > >> a new soname so the file is a different name, hence no collision (symlinks > >> to > >> libraries excepted). > >> > >> This is how it should work, any code that tries to do it a different way > >> is by > >> definition broken, that's why portage needs take no special measures. > >> > >> All of this is in complete contrast to other broken systems, such as > >> Windows > >> for example. On Windows, the filename IS the file, so upgrades are > >> horrible. > >> Installers must put the file somewhere else and have the final steps and > >> registry updates done at next reboot before anything has a chance to open > >> libs. This is why fairly deep updates on Windows often require multiple > >> reboot > >> - multiple apps installed multiple libs to be fiddled with multiple times > >> .... > >> > >> > > > > Many thanks Alan, > > > > so I conclude that rebooting IS necessary to get the new libraries used, > > isn't it? > > On the other hand running applications should continue to run, which is > > not always the case, e.g. recently using cvs as non-root user just > > hanged. Rebooting the system solved it (since I update my system nearly > > each day). > > > > Thanks again Alan, > > Helmut. > > > > I'll add two cents here. Let's say I upgrade Seamonkey which is my web > browser / email program. I sync and notice there is a update to > Seamonkey available and I let emerge update it. When the install is > complete, I don't have to reboot or even log out of KDE. All I have to > do is close Seamonkey and start it again. It will then load the new > updated version and run it. > > The same could be said for a service like cups. If you update cups, all > you have to do is restart the service. It will stop the old service > then load up the new service that was just installed. Just a simple > "/etc/init.d/cupsd restart" will work just fine. > > If you upgrade something kde, say kdelibs or some other kde base > package, then all you need to do is log out of KDE and log back in > again. Sort of the same with updating xorg, logout, go to a console and > restart xdm or whatever you use to start X. I usually use the ctrl alt > backspace key but restarting the service is better, or so some have said > anyway. > > Rebooting will also do all of this but it is not needed. From a > technical stand point, the only time you must reboot is to load a new > kernel. > > Hope that helps a little. > > Dale > > :-) :-)
I absolutely concur with Alan and Dale, I just want to warn a bit about complex X11-environments like gnome or kde. If you logout and login again, it is NOT secure, that all gnome/kde/qt apps have been closed. There are services (gconf, kded, pulse, etc) that take a time to quit, or sometimes just don't :( Then, when an app was linked against a symlink, and that left-over-app too, the dynamic loader may not load a newly installed library, but reuses the one in memory (from the left-over-app). [1] It's still valid, that no reboot is needed, but you sure can be unlucky :) Bye, Daniel [1] don't take this info for granted, I'm no expert in this - just what I understood from reading... -- PGP key @ http://pgpkeys.pca.dfn.de/pks/lookup?search=0xBB9D4887&op=get # gpg --recv-keys --keyserver hkp://subkeys.pgp.net 0xBB9D4887
signature.asc
Description: This is a digitally signed message part

