Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#2334 - AND-based package searching for Pacman
Attached to Project:
Pacman
Opened by Luke McCarthy (shaurz) - Monday, 07 March 2005, 16:55 GMT
Last edited by Xavier (shining) - Wednesday, 30 July 2008, 12:08 GMT
Opened by Luke McCarthy (shaurz) - Monday, 07 March 2005, 16:55 GMT
Last edited by Xavier (shining) - Wednesday, 30 July 2008, 12:08 GMT
|
DetailsIn my experience I have found that sometimes it is difficult searching for packages with pacman because it returned /more/ results when I tried to narrow the search by being more specific (i.e. by adding more words).
I have implemented AND-based package searching for pacman. With this modification only results containing all given words are displayed. See the forum topic: http://bbs.archlinux.org/viewtopic.php?t=10528 The diff for pacman-2.9.5: http://www.iogopro.co.uk/contrib/pacman-2.9.5/pacman_and_search.diff It has been suggested that this could be added as another option. If we have agreement I would request it be integrated as the default option (as it is in the above implementation). Either way, I think it would be great for pacman to have this ability. |
This task depends upon
Closed by Xavier (shining)
Wednesday, 30 July 2008, 12:08 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in b8e306b73e9b
Wednesday, 30 July 2008, 12:08 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in b8e306b73e9b
Pacman's code has probably moved on quite a bit (I guess) since I wrote this.
Old reports are old. Allan & I are doing a cleanup here and this will get closed unless someone provides a patch as it appears none of the current developers want to do it.
I am not sure exactly how to do it, but just a quick first sight lets me think that the patch would be bigger and more complicated than that.
I was thinking you need to set "found=1" at the start of the search, put the search bit in a loop with a "found=0; break" if it is not found. Then test found at the end of the loop. So about 10 lines :D
1) loop on all packages
2) loop on the targets
That way, it is easier and we can do like you said.
But we lose the nice performance tweak of 726e90dc2c860ee6893df29f9d8cf9c886fdd66d by doing that.
Otherwise what I am thinking about now is to compute just one regexp, doing an AND of all targets, but I am not sure how to do that yet.
And if I find a way, I am not sure it will preserve c7879e77a716edc725858e316ea9d2fa00056d4d (searching for plain strings for handling packages like dvd+rw-tools).
And the last way I see would be something like filtering a result list step by step.
I also think this new behavior is much more useful.