FS#25236 - Add --print support to --query.

Attached to Project: Pacman
Opened by H. Giskard Reventlov (Reventlov) - Saturday, 23 July 2011, 13:07 GMT
Last edited by Allan McRae (Allan) - Friday, 23 December 2022, 14:17 GMT
Task Type Feature Request
Category Output
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version 3.5.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hello.
Summary and Info:
You should be able to sort package which are on you system by their repositery, for example.
Problem: You can't without use -S, -Q, grep and pipe or redirection.
Adding --print and --print-format support to --query allow you to choose to display the repositery without change default behavior. and
Sorry for my poor english, and thanks for any reply.
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 23 December 2022, 14:17 GMT
Reason for closing:  Deferred
Additional comments about closing:  Transferred to gitlab:
https://gitlab.archlinux.org/pacman/pacm an/-/issues/6
Comment by Karol Błażewicz (karol) - Saturday, 23 July 2011, 18:01 GMT
You can use expac.
Comment by Allan McRae (Allan) - Monday, 20 February 2012, 05:59 GMT
pacman does not know what repository and installed package came from (if any...).
Comment by Karol Błażewicz (karol) - Monday, 20 February 2012, 06:16 GMT
pacman (and expac) can search the repos enabled in pacman.conf for packages with the same name.
$ expac "%n-%v %r" -S opera
opera-11.61-5 herecura-stable
opera-11.61-1 community
opera-devel-10.70_6396-1 archstuff


@OP
Have a look at 'expac "%n-%v %r" -S $(pacman -Qq)'
Comment by Allan McRae (Allan) - Monday, 20 February 2012, 06:28 GMT
That does not mean the output is right...

e.g.
1) I rebuild a package with custom configure options and install it. It is still reported as coming from the repo.
2) A package gets updated in the repos. Now you have no idea what repo your package originally came from (if any).
3) A package is in repos [A] and [B] (in that order in pacman.conf). I use "pacman -S B/pkg" to install it. Which repo did it come from?

Comment by Karol Błażewicz (karol) - Monday, 20 February 2012, 07:40 GMT
I know it's simply not possible w/o changing the local datastructure as pacman doesn't store this info atm, I simply offered some suggestions.

Loading...