FS#9144 - Odd behavior of pacman -Qt

Attached to Project: Pacman
Opened by Darwin Bautista (djclue917) - Thursday, 10 January 2008, 07:26 GMT
Last edited by Dan McGee (toofishes) - Friday, 11 January 2008, 05:17 GMT
Task Type Bug Report
Category Output
Status Closed
Assigned To Xavier (shining)
Architecture All
Severity Low
Priority Normal
Reported Version 3.1.0
Due in Version 3.1.1
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

pacman -Qt doesn't list actual 'orphans'. What it does is "list all packages not required by any package" even though those packages were explicitly installed. Was this the intended behavior of -Qt? If yes then the 'orphans' term is misleading. IMO, the "real orphans" are those packages which were installed as a dependency (not explicitly) for another package that has already been removed/uninstalled.

$ pacman -Qi pyqt3
Name : pyqt3
Version : 3.17.4-1
<snipped>
Architecture : i686
Build Date : Friday, 07 December, 2007 04:09:38 PM PHT
Install Date : Wednesday, 09 January, 2008 03:57:18 PM PHT
Install Reason : Explicitly installed
Install Script : No
Description : PyQt is a set of Python bindings for the Qt toolkit.

$ pacman -Qe pyqt3
pyqt3 3.17.4-1
$ pacman -Qt pyqt3
pyqt3 3.17.4-1


Steps to Reproduce:
1. Install a package explicitly
2. Compare the output of pacman -Qe <pkgname> and pacman -Qt <pkgname>
This task depends upon

Closed by  Dan McGee (toofishes)
Friday, 11 January 2008, 05:17 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in git
http://projects.archlinux.org/git/gitweb .cgi?p=pacman.git;a=commit;h=aec7c136481 79e6d77d1fea9233e35fb9f9d1e05
Comment by Xavier (shining) - Thursday, 10 January 2008, 08:01 GMT
From man pacman, query options section :
-d, --deps
List all packages installed as dependencies. This option can be combined
with -t for listing real orphans- packages that were installed as
dependencies but are no longer required by any installed package. (-Qdt
is equivalent to the pacman 3.0.X -Qe option.)
Comment by Darwin Bautista (djclue917) - Thursday, 10 January 2008, 10:45 GMT
If that's the case, then the long option, --orphans, is really confusing and is way inappropriate for the description "list all packages not required by any package". I suggest using a different option name, probably 'unrequired' or a better antonym but not 'orphans'. What do you think?
Comment by Roman Kyrylych (Romashka) - Thursday, 10 January 2008, 12:19 GMT
I agree with Darwin about --orphans here.
Comment by Roman Kyrylych (Romashka) - Thursday, 10 January 2008, 12:23 GMT
How about making --orphans equivalent for -dt
and --unrequired or --nondeps becoming a long version of -t ?
Comment by Dan McGee (toofishes) - Thursday, 10 January 2008, 13:49 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Architecture (i686 → All)
  • Field changed: Severity (High → Low)
  • Task assigned to Xavier (shining)
High severity? Really? What is a kernel bug in your book then?

Xavier, since this is your stuff feel free to handle it how you want. My vote would be to kill the longopt named --orphans, I think.
Comment by Darwin Bautista (djclue917) - Thursday, 10 January 2008, 13:56 GMT
Sorry about the "high severity". I thought that pacman was "behaving badly" or that it messed something up because '--orphans' is giving me "weird" results.
Comment by Xavier (shining) - Thursday, 10 January 2008, 13:56 GMT
I don't have any strong opinions, I would be fine with both proposals.
But just removing the --orphans long option (and leaving the short -t) would be easier of course. Darwin, would this be ok ?
Comment by Darwin Bautista (djclue917) - Thursday, 10 January 2008, 14:08 GMT
I think Roman's suggestion of --nondeps is a good replacement for --orphans. On the other hand, I think just removing --orphans would also be ok since I myself rarely use longopts.
Comment by Xavier (shining) - Thursday, 10 January 2008, 14:32 GMT
Oh wait, actually, I don't understand that --nondeps name. In my mind, it isn't what -t is at all.
--nondeps sounds more like the opposite of -d --depends, but that would be -e, --explicit.
So I would prefer either renaming --orphans to --unrequired, or just removing it.
Comment by Roman Kyrylych (Romashka) - Thursday, 10 January 2008, 14:36 GMT
by --nondeps I meant - "not a dependency of anything"
but yeah, it may confusing too, so it's better to just remove it or use long --unrequired
Comment by Xavier (shining) - Thursday, 10 January 2008, 15:48 GMT
Well, here is a patch.
I chose unrequired because I had to pick a name anyway (all short options also have a long option, and the term orphan had to be replaced by something else at several places in the code anyway)
I also noticed that zsh_completion file was a bit strange, for example the difference between query_actions and query_modifiers are rather obscure to me, and some options appear in both (for example -e, which i removed from query_actions. but -g is still there).

Loading...