You are not logged in.

#1 2007-09-26 22:41:46

venky80
Member
Registered: 2007-05-13
Posts: 1,002

A pacman question

I have a question as to how pacman deals with dependencies

let us suppose i install an application A with pacman -Sy A which has dependencies X Y and Z

Now I install another application B with dependencies M N and X

whan happens if I uninstall A with pacman -Rc A

would only Y and Z be uninstalled with A

and would M N X be unistalled if I uninstall B?

In in short would i be left with any of X Y Z M  or N if i get rid of both A and B

I am a newbie so please dont be harsh if it is a stupid question


Acer Aspire V5-573P Antergos KDE

Offline

#2 2007-09-26 23:13:26

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: A pacman question

Pacman records the dependencies loaded and removes those it records when you remove the packages with the ....Rc command.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2007-09-26 23:15:08

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: A pacman question

You would have to do pacman -Rs in order to achieve the behavior you've described. -Rc would recursively "Remove  all  target  packages,  as well as all packages that depend on one or more target packages."  The differences are pretty well described in the pacman man page.

Offline

#4 2007-09-26 23:57:22

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: A pacman question

well i read the man page and i am still unclear
so if i do a Rc on A after i have installed A and B, would it uninstall both A and B or just A.
and if I do Rs on A afer i have installed A and B would it remove A Y and Z but leave B X M and N?

Could anyone explain?


Acer Aspire V5-573P Antergos KDE

Offline

#5 2007-09-27 00:38:53

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: A pacman question

Let me rephrase your example:

A depends on Adep-1, Adep-2, ABdep. 
B depends on Bdep-1, Bdep-2, ABdep.

You install A, then B.

pacman -Rs A will remove A, Adep-1, and Adep-2
pacman -Rc A will remove A.

pacman -Rs B will remove B, Bdep-1, and Bdep-2
pacman -Rc B will remove B.

Say you remove A.  Then:

pacman -Rs B will remove B, Bdep-1, Bdep-2, and ABdep.
pacman -Rc B will still only remove B

Offline

#6 2007-09-27 01:03:15

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: A pacman question

Thank you very much, so I guess it is good to remove using Rs....is it?


Acer Aspire V5-573P Antergos KDE

Offline

#7 2007-09-27 01:17:52

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

Re: A pacman question

venky80 wrote:

Thank you very much, so I guess it is good to remove using Rs....is it?

pacman -Rs is what I usually do for removing packages.  You can also check for orphans using pacman -Qe, by the way.

Offline

#8 2007-09-27 02:50:08

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: A pacman question

Just do pacman -Rsc, it'll usually be what you want.


I am a gated community.

Offline

#9 2007-09-27 02:58:50

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: A pacman question

I just noticed that now -Qe list orphans that were dependencies of old packages that have since been removed, when it used to list only explicitly installed packages that didn't have any 'required by' packages.  Is there an easy way to find those old-style orphans anymore?

Last edited by elasticdog (2007-09-27 02:59:22)

Offline

#10 2007-09-27 07:15:49

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

Re: A pacman question

elasticdog wrote:

I just noticed that now -Qe list orphans that were dependencies of old packages that have since been removed, when it used to list only explicitly installed packages that didn't have any 'required by' packages.  Is there an easy way to find those old-style orphans anymore?

Since many users were not satisfied, I proposed a more powerful (and confusing?) set of options for 3.1, so that everyone could do what he likes :
http://bugs.archlinux.org/task/7343#comment17901

It's still not to late to complain/whine about them.


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

Offline

#11 2007-09-27 16:13:46

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: A pacman question

Just added a comment in support of your proposed changes in the bug-tracker.  Looks like they've already been merged in for a future release, so thanks for getting the ball rolling shining!  I'm looking forward to having those options be a lot more flexible in helping tracking down various types of packages.  A clean system is a happy system tongue

Offline

#12 2007-09-27 16:52:33

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

Re: A pacman question

elasticdog wrote:

Just added a comment in support of your proposed changes in the bug-tracker.  Looks like they've already been merged in for a future release, so thanks for getting the ball rolling shining!  I'm looking forward to having those options be a lot more flexible in helping tracking down various types of packages.  A clean system is a happy system tongue

Indeed, this has already been merged in 3.1, but I didn't receive much feedbacks on pacman-dev ML and in this feature request.
I also mentioned it a few times on IRC, and a few users said they liked it, but I still had some doubts. So thanks for your positive comment smile

Anyway, even if some users realize when 3.1 is released that they strongly dislike these, I guess it should be easy to change it later in a minor release, like 3.1.1 or something.


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

Offline

#13 2007-09-28 18:50:38

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: A pacman question

So then would it be true if you install all packages with -Sy and remove all packages with  -Rsc you will have no orphan packages in your system?


Acer Aspire V5-573P Antergos KDE

Offline

#14 2007-09-28 19:30:47

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

Re: A pacman question

venky80 wrote:

So then would it be true if you install all packages with -Sy and remove all packages with  -Rsc you will have no orphan packages in your system?

No, that's incorrect. See http://bugs.archlinux.org/task/5974


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

Offline

Board footer

Powered by FluxBB