[gobolinux-users] Program dependency registering among each other
hisham.hm at gmail.com
hisham.hm at gmail.com
Fri Jun 29 04:26:05 UTC 2007
On 6/28/07, Jan Molič <mig at 1984.cz> wrote:
> sometimes when you install new library and then remove old, some programs
> don't start, because depend on the old library.
> If it happen to programs like KDE, it's very confusing to find out which
> library cause problems, especially if you upgrade more libraries at once.
> My solution would be to register each program to another's Resources/UsedBy.
> For example if we have four versions of libA,
> then install programB/1.1 which depends on libA >= 2.0 and libA <= 3.0,
> programB will be symlinked to
> If you want to remove libA/2.0, RemoveProgram firstly check which program
> depends on libA/2.0. If it found another version covering programB/1.1
> dependency, libA would be removed. Otherwise RemoveProgram would complain.
> you remove programB/1.1, the UsedBy link will break and will be considered
> not there.
The same could be achieved by doing a global check on all dependency
files. Which is something we'd prefer to avoid, of course. So, let's
think if the approach you propose eliminates the need of doing a
global check on dependencies:
The first problematic point I see is: "RemoveProgram firstly check
which program depends on libA/2.0". Looking just at the UsedBy
directory would work, but part of the scheme depends that every
satisfying dependency should have a UsedBy symlink, like libA/2.0 and
The problem is, what if libA/2.0 was installed _after_ programB/1.1
was installed? It can be UsedBy programB/1.1, but how will this be
registered? One way would be to do a global check on all dependency
files, but that is what the whole UsedBy scheme intends to avoid, I
An optimization over that would be to look at UsedBy entries of other
versions of libA that are already installed, check the dependency
files of programs mentioned there (like programB/1.1 in libA/3.0) and
only check those, to see if the range they describe are valid. This
however, assumes that the all dependencies are properly satisfied by
the time something is installed, which is often not the case.
The overall idea that there should be a reverse check available for
when removing programs is good. But an efficient implementation is
something to be thought about carefully.
More information about the gobolinux-users