FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-11-2009, 08:11 AM
Helmut Jarausch
 
Default What magic does portage use?

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.

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
 
Old 12-11-2009, 08:20 AM
Alan McKinnon
 
Default What magic does portage use?

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 ....


--
alan dot mckinnon at gmail dot com
 

Thread Tools




All times are GMT. The time now is 08:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org