[pacman-dev] [PATCH 1/7] Copyright year bump
Signed-off-by: Pierre Neidhardt
Signed-off-by: Pierre Neidhardt
Signed-off-by: Pierre Neidhardt
Previously pkgname and pkgver were stored together, and group was ignored.
Signed-off-by: Pierre Neidhardt
On 23/01/14 09:07, Pierre Neidhardt wrote:
Previously pkgname and pkgver were stored together, and group was ignored.
Signed-off-by: Pierre Neidhardt
---
Fine - I changed the commit message as group was printed with the old pacsearch: pacsearch: Explicitly extract group information Also store pkgname and pkgver separately.
Signed-off-by: Pierre Neidhardt
No more per-repo coloring: this was not Arch-agnostic, and there is no
reasonable, simple way to color repos in a consistant manner with only 6 colors.
'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo.
to_color subroutine: it takes an array instead of a string, this is faster and
simpler.
Signed-off-by: Pierre Neidhardt
On 01/23/14 at 12:07am, Pierre Neidhardt wrote:
No more per-repo coloring: this was not Arch-agnostic, and there is no reasonable, simple way to color repos in a consistant manner with only 6 colors.
'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo.
to_color subroutine: it takes an array instead of a string, this is faster and simpler.
Signed-off-by: Pierre Neidhardt
--- contrib/pacsearch.in | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-)
If we use pacman's color theme and remove per-repo coloring does this script still do anything worth keeping it around and fixing its bugs (try `pacsearch pacman mirrorlist`)? All that's left is searching both -Ss and -Qs, recoloring "local/" red, adding "[installed]" to -Qs entries, and hiding -Qs entries that are also in -Ss. All but the last can be accomplished in a few lines of bash using sed.
On 14-01-23 08:38:22, Andrew Gregory wrote:
On 01/23/14 at 12:07am, Pierre Neidhardt wrote:
No more per-repo coloring: this was not Arch-agnostic, and there is no reasonable, simple way to color repos in a consistant manner with only 6 colors.
'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo.
to_color subroutine: it takes an array instead of a string, this is faster and simpler.
Signed-off-by: Pierre Neidhardt
--- contrib/pacsearch.in | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) If we use pacman's color theme and remove per-repo coloring does this script still do anything worth keeping it around and fixing its bugs (try `pacsearch pacman mirrorlist`)? All that's left is searching both -Ss and -Qs, recoloring "local/" red, adding "[installed]" to -Qs entries, and hiding -Qs entries that are also in -Ss. All but the last can be accomplished in a few lines of bash using sed.
That was what I suggested in the first place a few days ago in my 'request for removal' mail. But Dan finds the combo of -Ss and -Qs quite useful and pointed quite good reasons to keep it. This script is tiny, right, but not enough to be a one-liner (the "duplicate entry removal" needs a hash table and some parsing). Besides when you do it with sed/awk, you lose the coloring. And with sed/awk it's hard to sort without another call to 'sort', which does not save time. All these reasons are good enough to have this script. If I understood you correctly, `pacsearch pacman mirrorlist` is not a bug. pacsearch's argument is a pattern, not package names. See pacsearch -h. -- Pierre Neidhardt What the large print giveth, the small print taketh away.
On 01/23/14 at 02:58pm, Pierre Neidhardt wrote:
On 14-01-23 08:38:22, Andrew Gregory wrote:
On 01/23/14 at 12:07am, Pierre Neidhardt wrote:
No more per-repo coloring: this was not Arch-agnostic, and there is no reasonable, simple way to color repos in a consistant manner with only 6 colors.
'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo.
to_color subroutine: it takes an array instead of a string, this is faster and simpler.
Signed-off-by: Pierre Neidhardt
--- contrib/pacsearch.in | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) If we use pacman's color theme and remove per-repo coloring does this script still do anything worth keeping it around and fixing its bugs (try `pacsearch pacman mirrorlist`)? All that's left is searching both -Ss and -Qs, recoloring "local/" red, adding "[installed]" to -Qs entries, and hiding -Qs entries that are also in -Ss. All but the last can be accomplished in a few lines of bash using sed.
That was what I suggested in the first place a few days ago in my 'request for removal' mail. But Dan finds the combo of -Ss and -Qs quite useful and pointed quite good reasons to keep it.
I'm not disputing the usefulness of searching -Qs and -Ss at the same time, but that alone is a one line bash function. There's no point in keeping this script if that's all we care about.
This script is tiny, right, but not enough to be a one-liner (the "duplicate entry removal" needs a hash table and some parsing). Besides when you do it with sed/awk, you lose the coloring. And with sed/awk it's hard to sort without another call to 'sort', which does not save time. All these reasons are good enough to have this script.
pacsearch does not sort its results and you can still have color with sed/awk with --color=always.
If I understood you correctly, `pacsearch pacman mirrorlist` is not a bug. pacsearch's argument is a pattern, not package names. See pacsearch -h.
pacman mirrorlist is not the name of a package, those are two separate search terms that pacsearch needlessly combines into a single term when it passes them to pacman. apg
On 14-01-23 10:03:57, Andrew Gregory wrote:
On 01/23/14 at 02:58pm, Pierre Neidhardt wrote:
On 14-01-23 08:38:22, Andrew Gregory wrote:
On 01/23/14 at 12:07am, Pierre Neidhardt wrote:
No more per-repo coloring: this was not Arch-agnostic, and there is no reasonable, simple way to color repos in a consistant manner with only 6 colors.
'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo.
to_color subroutine: it takes an array instead of a string, this is faster and simpler.
Signed-off-by: Pierre Neidhardt
--- contrib/pacsearch.in | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) If we use pacman's color theme and remove per-repo coloring does this script still do anything worth keeping it around and fixing its bugs (try `pacsearch pacman mirrorlist`)? All that's left is searching both -Ss and -Qs, recoloring "local/" red, adding "[installed]" to -Qs entries, and hiding -Qs entries that are also in -Ss. All but the last can be accomplished in a few lines of bash using sed.
...
This script is tiny, right, but not enough to be a one-liner (the "duplicate entry removal" needs a hash table and some parsing). Besides when you do it with sed/awk, you lose the coloring. And with sed/awk it's hard to sort without another call to 'sort', which does not save time. All these reasons are good enough to have this script.
pacsearch does not sort its results and you can still have color with sed/awk with --color=always.
I'm not sure that's a good solution, since the parsing gets tricky with all the colors into the strings. Try this: $ pacman -Ss pacman --color=always | awk '/core\/pacman/' <no result> $ pacman -Ss pacman | awk '/core\/pacman/' core/pacman 4.1.2-5 (base base-devel) [installerad] core/pacman-mirrorlist 20140107-1 [installerad]
If I understood you correctly, `pacsearch pacman mirrorlist` is not a bug. pacsearch's argument is a pattern, not package names. See pacsearch -h.
pacman mirrorlist is not the name of a package, those are two separate search terms that pacsearch needlessly combines into a single term when it passes them to pacman.
apg
Actually I was thinking this behaviour is a feature, for instance to find two words in a description. But pacman does not behave this way. $ pacman -Ss 'based package' core/pacman 4.1.2-5 (base base-devel) [installerad] A library-based package manager with dependency support $ pacman -Ss based package core/pacman 4.1.2-5 (base base-devel) [installerad] A library-based package manager with dependency support community/qcad 3.4.5.0-2 A 2D CAD package based upon Qt $ pacsearch based package core/pacman 4.1.2-5 (base base-devel) [installerad] A library-based package manager with dependency support I've just fixed it, it's a trivial bug. Thanks for pointing this out. -- Pierre Neidhardt The District of Columbia has a law forbidding you to exert pressure on a balloon and thereby cause a whistling sound on the streets.
Signed-off-by: Pierre Neidhardt
participants (3)
-
Allan McRae
-
Andrew Gregory
-
Pierre Neidhardt