You are not logged in.

#1 2008-08-23 22:11:26

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

How are dependencies decided?

I recently made a mistake which got me wondering about dependency checks done by pacman. When we visited my mother-in-law some months ago I gave her a new computer, and I also switched Linux distribution from Fedora to Arch. She lives in another country and there's a sea between, so the choice of Arch might seem odd, but that's what works best for me. I use ssh with key and password, and for more direct help on the desktop she has a starter for opening up a x11vnc session.

Now to the point: as DE she had KDEmod, but as many know there was recently a crossroad when you got to choose between KDE 3.x or 4.x. I decided that the easiest path would be 4.x since that definitely would roll on for many years to come. As preparation I updated the system bit by bit, and one step was the new kernel and nvidia closed-source drivers. Here's my mistake: pacman -Sy kernel26 nvidia. Yes, I was in a hurry so I forgot about nvidia-utils, and didn't notice it.

Next day on phone my mother-in-law tells me that the screen goes black and returns to a basic shell. I ssh into her system and check the output of Xorg.0.log and then notice the conflict between versions of nvidia and nvidia-utils. Easy fix of course, but it made me wonder:

- how come nvidia according to pacman doesn't depend on the same version of nvidia-utils, if some version already exists in the system?

It was my mistake, but I thought pacman would automatically ask for such a dependency. Could it be that the dependency is a simple check of "versions greater than", and that all mirrors always are synchronized with both nvidia and nvidia-utils, and hence no further check is done if pacman has some kind of version already installed? On a "clean" system pacman will always pull both nvidia and nvidia-utils.

Sorry for being to wordy, and probably adding too much unnecessary information. By the way: following the standard procedure the switch to KDEmod 4.1 went smoothly. Only problem is that my mother-in-law once more is a bit confused about where to find what.

Last edited by KimTjik (2008-08-23 22:15:27)

Offline

#2 2008-08-23 22:39:18

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How are dependencies decided?

This sounds like a reasonable request.

Just report it on bugs.archlinux.org (and try to be less verbose there smile)


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2008-08-24 08:00:43

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: How are dependencies decided?

I'll make a bug report then.

(Before I wrote my post I had read some parts of this thread: http://bbs.archlinux.org/viewtopic.php?id=47377&p=1; maybe I made a mishmash of it! wink )

Thanks for you input.

Offline

#4 2008-08-24 10:42:17

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How are dependencies decided?

KimTjik wrote:

Here's my mistake: pacman -Sy kernel26 nvidia. Yes, I was in a hurry so I forgot about nvidia-utils, and didn't notice it.

Actually, I'd say your mistake was not doing -Syu, although this doesn't rule out the need for your bug report. I realise you had your reasons for not doing a full update, but it would have prevented this issue.

Offline

#5 2008-08-24 10:46:04

rooloo
Member
Registered: 2008-07-09
Posts: 218

Re: How are dependencies decided?

are not these dependencies all part of the PKGBUILD's responsibility and the packager to make sure that the provides, conflicts, and depends line are set correct so that pacman can and will call in all dependencies.

pacman is only as smart as the packager.

I don't really see where there is a problem or am I missing something?

Offline

#6 2008-08-24 11:03:16

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How are dependencies decided?

rooloo wrote:

are not these dependencies all part of the PKGBUILD's responsibility and the packager to make sure that the provides, conflicts, and depends line are set correct so that pacman can and will call in all dependencies.

pacman is only as smart as the packager.

I don't really see where there is a problem or am I missing something?

The problem is simple dependencies versus versioned dependencies.
Simple dependencies are most of the times present. This will make sure upgrading the whole system with -Su, and *installing* new packages will work fine.
Versioned dependencies are more rare however, which will prevent partial upgrade to work correctly, as in the original post.

That is why Arch only really recommends and supports full system upgrade, not partial upgrade.
That does not mean some little progress can't be made here on there adding versioned dependencies for better partial upgrade support, but it means it will never be perfect.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2008-08-24 14:07:56

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: How are dependencies decided?

tomk wrote:
KimTjik wrote:

Here's my mistake: pacman -Sy kernel26 nvidia. Yes, I was in a hurry so I forgot about nvidia-utils, and didn't notice it.

Actually, I'd say your mistake was not doing -Syu, although this doesn't rule out the need for your bug report. I realise you had your reasons for not doing a full update, but it would have prevented this issue.

Agreed. The circumstances are of course special in this case. Since I'm not using KDEmod myself I wasn't aware of the recent move to first totally switch to KDE 4.x, and then the decision to keep a legacy repository for KDEmod 3.x. I actually noticed it when the output of pacman -Syu suddenly showed conflicts between KDE and KDEmod libraries; the dropped repository isn't 100 % in sync with recent KDE applications. Hence my decision to install certain upgraded packages.

In view of circumstances it could well be that Arch wasn't the ideal choice in all aspects, since I don't have any physical access to the computer. Nevertheless it went pretty well, and so far the choice of Arch has paid off in having an easily configurable system to deal with. And I hope it stays that way.

On-topic: just as some packages are organized in groups, could packages dependent on each other like nvidia and nvidia-utils have some kind of group dependency applied?

Offline

#8 2008-08-24 14:44:56

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: How are dependencies decided?

KimTjik wrote:

On-topic: just as some packages are organized in groups, could packages dependent on each other like nvidia and nvidia-utils have some kind of group dependency applied?

It is not possible, and adding this would had quite a lot of complexity for a very small benefit.

Just use versioned dependencies, that is what they are for ...


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB