FS#7343 - pacman -Q options

Attached to Project: Pacman
Opened by Xavier (shining) - Saturday, 02 June 2007, 17:08 GMT
Last edited by Dan McGee (toofishes) - Tuesday, 06 November 2007, 06:05 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 3.0.4
Due in Version 3.1.0
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Summary and Info:
As I said here :
http://bbs.archlinux.org/viewtopic.php?pid=255318#p255318
it would be nice to copy some of the -Q options of yaourt :

(-Q, --query) -e, list all packages explicitly installed
(-Q, --query) -d, list all packages installed as a dependency for another package
(-Q, --query) -t search for missed installed orphans

So having e for explicit, d for dependency, and a different letter for orphans.

The current -Qe option lists orphans (dependency not required by any packages), and this can sometimes lead to confusion, because many users associate e with explicit.
This task depends upon

This task blocks these from closing
 FS#8109 - Pacman 3.1 Release Roadmap 
Closed by  Dan McGee (toofishes)
Tuesday, 06 November 2007, 06:05 GMT
Reason for closing:  Implemented
Additional comments about closing:  This is awesomeness- thanks again for the work on this Xavier. Tested and seems to work great in the GIT release I made tonight.
Comment by Xavier (shining) - Saturday, 02 June 2007, 19:54 GMT
While trying to implement it, I'm wondering what combining these options together should do..
Comment by Xavier (shining) - Saturday, 02 June 2007, 21:35 GMT
I thought it would be nice to allow combining these options, this would make my previous -Qee option obsolete.
-Qe : list all packages explicitly installed
-Qd : list all packages installed as dependencies
-Qt or -Qtd : list all packages installed as a dependencies but no longer required by any package
-Qte : list all packages explicitly installed and not required by any package (same as pacman 2 orphan option)
-Qted : list all packages not required by any package (same as my previous -Qee, see  bug 7208 )

Does this make any sense?
Comment by Xavier (shining) - Tuesday, 17 July 2007, 17:58 GMT
I think I came up with a much cleaner patch (two actually) here:
http://www.archlinux.org/pipermail/pacman-dev/2007-July/008890.html

Changing the options slightly helped to make it cleaner, but I'm not sure if that's ok.
It's similar to the ones above, but slightly different :

pacman -Qe : lists all explicitly installed packages
pacman -Qd : list all packages installed as dependencies
pacman -Qt : list all orphans (package not required by any others)
pacman -Qtd : list real orphans (package installed as dependencies,
but not required by any others anymore)
(that is the current orphan option)
pacman -Qte : list package explicitly installed and not
required by any others (pacman2 orphan option).

Advantage of these options (besides making the code easier) is that at most 2 options are required for getting all possible cases.
The disadvantage I see is that the most useful ones are apparently displaying explicitly packages (e) and real orphans (td),
so real orphans would now require two arguments.
I still find it clearer this way, but I really need some comments/opinions here (good or bad).
Comment by Dan McGee (toofishes) - Thursday, 16 August 2007, 00:19 GMT
OK, I've finally decided to pull these into my working branch as we have had no feedback and it greatly increases the flexibility of the options.

Is there any way you can write some updates to the man page to reflect these new options? I know English isn't your first language, but if you wrote a draft I will be happy to correct it and check it in. Use the asciidoc branch from my repo; we are going to use asciidoc in the future for all manpages.
Comment by Xavier (shining) - Thursday, 16 August 2007, 11:45 GMT
Ok, here is a try.
Comment by Aaron Bull Schaefer (elasticdog) - Thursday, 27 September 2007, 16:11 GMT
Just wanted to pop in and say I absolutely support these changes, and think the added flexibility will be a great help to users who want to be able to keep a better eye on what exactly is installed on their machines. I had just figured out that the orphans option had changed with pacman 3 and was trying to find a way to do the old style orphan lookup. I think this set of options makes things much clearer on what is happening.
Comment by Travis Willard (Cerebral) - Thursday, 27 September 2007, 17:26 GMT
Yeah, +1 for the changes. This kind of flexibility is cool. 8)
Comment by Dan McGee (toofishes) - Thursday, 27 September 2007, 17:30 GMT
This is actually already in GIT, so we are all set to go with this.

Loading...