You are not logged in.

#1 2005-02-13 05:53:35

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Pacman Administration Questions

As someone who enjoys the power of pacman, some of it's features are still a bit of a mystery to me.  The wiki or man pages on pacman doesn't seem to answer this, so bear with me.

1. Where does pacman gather it's information when doing a "pacman -Q"?

I assume all the entries in "/var/lib/pacman/local" are just returned here?  If so, what are the "/var/lib/pacman/{current,extra} directories for?  A complete reflection of what's in the stable ftp repo sites, but not installed on my system?

2. What truly qualifies a package as being an "orphan"?  In other words, what key or tag does pacman look at to flag it as such?

* Depending on how I "remove" and "install" packages from my system, some "orphans" will show up with "-Qe", and at other times they do not.

What I gather from the source: In "pacman_sync()" it's flagged as an "orphan" if "makepkg -s" did not have to "resolve" it as a dependcy, or in "pacman_add()" unless it was a dependency, thus the check in "pacman_query()":

if(info->requiredby == NULL && info->reason == REASON_EXPLICIT) {

** [ END of original intent of this post - Example of Question 2 follows ] **


I installed a BMP (GTK2 XMMS) plugin on my system, called "libvisual-bmp".  It was explicitly installed and rightfully shows up as an "orphan".  Installing that package, pulls in an additional 3 more.

[root@morpheus ~]# pacman -Sy libvisual-bmp
[...]
Targets: libvisual-0.1.7-1 libvisual-plugins-0.1.7-1 mesa-6.2.1-1
         libvisual-bmp-0.1.0-1

If I check for "orphans" at this point, it verifies that explicit install.

[root@morpheus ~]# pacman -Qe | grep 'libvisual|mesa'
libvisual-bmp 0.1.0-1

If I no longer want "libvisual-bmp" (and only "libvisual-bmp"), keeping "mesa" for example, I just use the "-R" switch (and not "-Rs"), I will get the following:

[root@morpheus ~]# pacman -R libvisual-bmp
removing libvisual-bmp... done.
[root@morpheus ~]# pacman -Qe |grep 'libvisual|mesa'
[root@morpheus ~]#

<returns no matching orphans on libvisual* or mesa*>

Which I don't understand, since (for example):

[root@morpheus ~]# pacman -Qi libvisual-plugins | grep 'Description|Required'
Required By    : None
Description    : xmms plugin for libvisual

and shows that this package is not required by any other packages.

* However, If I had installed all 4 packages independently and separate of eachother in the order necessary to finally install "libvisual-bmp", a successive order reversal of "pacman -R" would then have shown each as "orphans", per your definition.

I guess what I'm asking, is there anyway to "refresh" the pacman "db" before a "-Qe" orphan check, which would look for the "Required By    : None" tag?  Maybe I'm confusing the definition of "orphan".  If so, is there some other pacman switch I'm overlooking that already does this?

Also, one other note:  If you follow my example above, If I use "pacman -Rs libvisual-bmp", it will remove all 4 of those packages at once.  I like that.   However, say I just use "-R" for "libvisual-bmp".  When I go to use "pacman -Rs libvisual-plugins", it does not pull in "mesa" as part of the uninstallation from the remaining 3, since only "libvisual-bmp" reqired it from the 4.  I guess I've lost all the utility of "-Rs" since I didn't remove it as a package set?  If so, I guess that brings me back to the question of "orphans" and "stale" packages and if I'm not using some pacman switch properly to deal with them.

Thanks for reading my novel.  And, thanks for the flexibility of pacman.  I'm still trying to figure out all these fancy "doodads" you guys got built into this thing.  Sometimes, I get lost in the process. 

Much obliged.

Offline

#2 2005-02-17 16:33:32

jerem
Member
From: France
Registered: 2005-01-15
Posts: 310

Re: Pacman Administration Questions

I suggest you ask there questions directly to a pacman maintainer or browse yourself through pacman's source code. sad

Offline

#3 2005-02-17 16:48:03

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Pacman Administration Questions

I've had orphan issues too - perhaps the orphan checking code need a rewrite....

Offline

#4 2005-02-17 21:08:53

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Pacman Administration Questions

phrakture wrote:

I've had orphan issues too - perhaps the orphan checking code need a rewrite....

Phrakture, I read that post you're probably referring to as well, by jbNet.

He illustrates a similiar scenario, but I gather he was just looking for the "-Rs" implementation, which wasn't available at the time I believe.  I really don't need all that "power".  If I could just reliably retrieve a top-tree-level (non-dependant) package list, I can delete as I go.

I think while fumbling through the code again awhile back, I started to believe the current "orphan" design is by implementation, and what I'm looking for is not an "orphan" as I define it.  "orphan" was the only thing in the man pages which came close, thus my confusion. I think I remember another thread where some people posted a recursive dependency script to output what I'm looking for.  I'll just use that or make my own in the time being.

Offline

#5 2005-02-17 21:20:31

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: Pacman Administration Questions

jerem wrote:

I suggest you ask there questions directly to a pacman maintainer or browse yourself through pacman's source code. sad

Ah, yes indeed.  I had already fiddled around the code quite a bit before this post, and a relevant code summary and one explicit snipet was provided (check the top).

I gather they have bigger priorities on the "barbeque grill" than my (in essence) feature request.  I don't know how to get in touch with these guys other than here.  I've used IRC a whopping total of 10 times since I knew about it's availability in the late 80's.  Pretty sad, huh...

Offline

Board footer

Powered by FluxBB