You are not logged in.

#1 2008-01-22 23:05:55

Fuel
Member
Registered: 2008-01-22
Posts: 5

Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Hi

Just did a fresh install of archlinux after buying a new computer.
Installed some drivers.. kde (and some other stuff)
Then.. just for the fun of it I removed qt3 with pacman -Rd.
I was expecting that pacman -Syu would see that a dependency was missing and try to reinstall qt3.
So I did a pacman -Syu, and what happened? Nothing.. pacman says all is okay, well all is not okay cus kde will not work without qt3.
Is this how it should work or is this a bug? I checked the manpages for some kind of "install all missing dependencies" but found nothing..

/Ivan

Last edited by Fuel (2008-01-23 01:34:22)

Offline

#2 2008-01-22 23:45:08

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

I think yes, it is supposed to be this way. pacman -S doesn't check the dependencies of already installed packages, and in my opinion it really shouldn't. You should use 'pacman -Rd' only when you really know what you are doing. It is there for situations where you'd say want to install a package which provides qt3 (like qt-enhanced), but you cannot do it by installing qt-enhanced (since it conflicts with qt3) and you cannot pacman -R qt3, since pacman would complain that there are packages depending on it.

Offline

#3 2008-01-22 23:53:03

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

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Btw, the testdb tool checks the dependencies of already installed packages.


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

Offline

#4 2008-01-22 23:57:36

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

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Fuel wrote:

pacman says all is okay

Here's another way of putting it - pacman says all is okay because you specifically removed qt3. pacman is not going to assume you did something wrong, so therefore all is okay i.e. all is as the user wants it to be.

Offline

#5 2008-01-23 00:02:05

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,383
Website

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Also, think of the time each update would take if it had to check all the dependencies for previously installed packages....

Offline

#6 2008-01-23 00:15:17

Jessehk
Member
From: Toronto, Ontario, Canada
Registered: 2007-01-16
Posts: 152

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

man pacman wrote:

-d, --nodeps
           Skips all dependency checks. Normally, pacman will always check a
           packages dependency fields to ensure that all dependencies are
           installed and there are no package conflicts in the system.

smile

Offline

#7 2008-01-23 00:28:33

Fuel
Member
Registered: 2008-01-22
Posts: 5

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

I do not think the extra time is an issue since an update is not something you use very frequently - imo there should at least be an option for it.

Jessehk: yes Im aware of this, this is why I did the test.

The weird thing is also that, after I removed qt, i tried a "pacman -Sy kdebase" and even that didnt try to pull in qt3.

Sure -Rd is very stupid, but be aware that a lot of 3d party repos actually recommend the use of it when installing their packages. (kdemod for example, recommends you to use -Rd on every kde package!!!)
So its easily done that a newbie will use this kind of command, forget what he/she removed.. and end up with an unstable system.

As a developer you have to take account for all the ways your software will be used - even the bad ways

Offline

#8 2008-01-23 00:37:31

Fuel
Member
Registered: 2008-01-22
Posts: 5

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

tomk wrote:
Fuel wrote:

pacman says all is okay

Here's another way of putting it - pacman says all is okay because you specifically removed qt3. pacman is not going to assume you did something wrong, so therefore all is okay i.e. all is as the user wants it to be.

Sure, but what if the user isnt perfect? What if the user did a mistake (we're humans after all?)
What if this wasnt about qt3, but some package-with-very-hard-name-which-user-forgets. How is he/she then going to recover his mistake?

Offline

#9 2008-01-23 00:50:44

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Fuel wrote:

As a developer you have to take account for all the ways your software will be used - even the bad ways

That's not how Arch is supposed to work.  Arch is about giving power to the users.  With power comes responsibility, and this responsibility falls on the users in this case.  Remember -- this is a "do it yourself" kind of distribution and so if what I want to do is to screw up my system I should be able to do it in an easy, efficient and elegant way.  This is consistent with the mission statement of the Arch Linux project, this is how Arch works and this is why many of us love it.

On a personal note, if Arch/pacman tried to hold my hand more, like you suggest it should, I'd be switching to another distro very, very quickly.

Offline

#10 2008-01-23 01:05:16

Fuel
Member
Registered: 2008-01-22
Posts: 5

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

fwojciec wrote:

That's not how Arch is supposed to work.  Arch is about giving power to the users.  With power comes responsibility, and this responsibility falls on the users in this case.  Remember -- this is a "do it yourself" kind of distribution and so if what I want to do is to screw up my system I should be able to do it in an easy, efficient and elegant way.  This is consistent with the mission statement of the Arch Linux project, this is how Arch works and this is why many of us love it.

On a personal note, if Arch/pacman tried to hold my hand more, like you suggest it should, I'd be switching to another distro very, very quickly.

It's not really about trying to get arch/pacman to hold your hand for you. It's more about giving the possibility to recover from a serious mistake. If you can tell me something wrong with adding an option wich checks for missing dependencies on your system and how that particular feature intervenes with "the arch way" - then please do.

I'm not saying arch is bad, arch is actually the best linux distro I've used so far - but there is something common with almost all distros - you get dependency problems after a while, one way or another.
Thats why I think there should be a way to resolve such issues.

Offline

#11 2008-01-23 01:10:06

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

As someone has said already -- testdb is an app that checks pacman database for dependency problems.  It's included in pacman package.

Offline

#12 2008-01-23 01:19:48

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,383
Website

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Fuel wrote:

Sure, but what if the user isnt perfect? What if the user did a mistake (we're humans after all?)
What if this wasnt about qt3, but some package-with-very-hard-name-which-user-forgets. How is he/she then going to recover his mistake?

Well they can look in /var/log/pacman.log where all their stupid decisions are recorded.... big_smile

Edit:  500th post!

Last edited by Allan (2008-01-23 01:20:14)

Offline

#13 2008-01-23 01:34:01

Fuel
Member
Registered: 2008-01-22
Posts: 5

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Since testdb is included with pacman and does exactly what im asking for - there really is no issue here (: (I thought it was some third party "unsupported" software)
You can probably remove the whole thread

Thanks for the responses guys and sorry for wasting your time (:

Offline

#14 2008-01-23 10:15:50

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

Re: Is this how pacman is supposed to work? (dependency "problem")[SOLVED]

Fuel wrote:

Sure -Rd is very stupid, but be aware that a lot of 3d party repos actually recommend the use of it when installing their packages. (kdemod for example, recommends you to use -Rd on every kde package!!!)

Ah, that's interesting indeed, I am not sure why they need to do that, but I would like to know smile

There is one case where -Rd is safe to use, it's when you replace a package by a provider.
For example, qt-enhanced provides qt3, so you can do :
pacman -Rd qt3 and pacman -S qt-enhanced
But pacman -S qt-enhanced can already remove qt3 automatically, so just doing pacman -S qt-enhanced is enough here.

However, if you are working on package files directly (pacman -U) instead of repositories (pacman -S), then you will need it :
pacman -Rd qt3*.pkg.tar.gz and pacman -U qt-enhanced*.pkg.tar.gz


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

Offline

Board footer

Powered by FluxBB