You are not logged in.

#1 2020-03-21 09:29:29

regid
Member
Registered: 2016-06-06
Posts: 201

Do pacman search results matching its manual page for --search?

pacman manual page for --query --search wrote:

       -s, --search <regexp>
           Search each locally-installed package for names or
           descriptions that match regexp. When including
           multiple search terms, only packages with
           descriptions matching ALL of those terms are
           returned.

A similar text is given for --sync --search.
In that case, how come

$ pacman --query --search pan | grep ncurses
local/ncurses 6.2-1

shows ncurses? Could it be because ncurses provides libpanelw.so?

$ pacman --query --info ncurses | grep --ignore-case pan
Provides        : libncurses++w.so=6-64  libformw.so=6-64  libmenuw.so=6-64  libpanelw.so=6-64  libncursesw.so=6-64

Aren't Name and Description defined fields in the output of --query --info? Was it supposed to search Provides too? Is this a feature, and the manual page is inaccurate?

Last edited by regid (2020-03-21 13:30:05)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#2 2020-03-21 09:49:46

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: Do pacman search results matching its manual page for --search?

Could you please elaborate a bit?

You're asking about the -s/--search option(s), but your example is for the -i/--info output. Also, what's the purpose of grepping for `pan` there?
The manual states that (if you actually do use -s/--search), it will search for the search string in the name and description of each package. What part is inaccurate? Is your question about how you can make it search the "Provides" part, too?

Last edited by ayekat (2020-03-21 09:50:24)


pkgshackscfgblag

Offline

#3 2020-03-21 12:32:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Do pacman search results matching its manual page for --search?

$ pacman -Si pacman
Repository      : core
Name            : pacman
Version         : 5.2.1-4
Description     : A library-based package manager with dependency support

for names or descriptions that match regexp

Offline

#4 2020-03-21 12:50:42

regid
Member
Registered: 2016-06-06
Posts: 201

Re: Do pacman search results matching its manual page for --search?

You are right my initial post jumped to the middle of the issue. I have edited it. Hopefully, it will now be clear. Do read it again.

ayekat wrote:

Could you please elaborate a bit?

You're asking about the -s/--search option(s), but your example is for the -i/--info output. Also, what's the purpose of grepping for `pan` there?
The manual states that (if you actually do use -s/--search), it will search for the search string in the name and description of each package. What part is inaccurate? Is your question about how you can make it search the "Provides" part, too?

Last edited by regid (2020-03-21 13:34:47)


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#5 2020-03-21 13:08:52

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Do pacman search results matching its manual page for --search?

I think I understand what you're asking. here's the output on my system for reference :

$ pacman --query --search pan
local/krusader 2.7.2-3
    Advanced twin panel (commander style) file manager
local/lxqt-panel 0.14.1-2 (lxqt)
    The LXQt desktop panel
local/ncurses 6.2-1
    System V Release 4.0 curses emulation library
local/pango 1:1.44.7+11+g73b46b04-1
    A library for layout and rendering of text
local/perl 5.30.1-1
    A highly capable, feature-rich programming language
local/perl-error 0.17029-1
    Perl/CPAN Error module - Error/exception handling in an OO-ish way
$ 

You wonder why ncurses and perl are shown as results ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2020-03-21 13:32:40

regid
Member
Registered: 2016-06-06
Posts: 201

Re: Do pacman search results matching its manual page for --search?

Yes. I wonder why ncurses and perl are mentioned.
I have edited my initial post a short while ago. Hopefully, it will be clear now.


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#7 2020-03-21 13:52:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: Do pacman search results matching its manual page for --search?

Provides entries are names - for many purposes, they can be treated like package names:

$ pacman -S libpanelw.so
warning: ncurses-6.2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)   Old Version  New Version  Net Change

core/ncurses  6.2-1        6.2-1          0.00 MiB
...

$ pacman -Q libpanelw.so
ncurses 6.2-1

$ pacman -Qi libpanelw.so
Name            : ncurses
Version         : 6.2-1
Description     : System V Release 4.0 curses emulation library
...

Certainly, "name" in the man page there could be argued to be ambiguous.  But it doesn't explicitly say it will match package names and descriptions.  Perhaps a different word from "name" could clarify that entry in the man page.  "target" perhaps, or just explicitly note that packages provided by a given package are also names for that package.

Last edited by Trilby (2020-03-21 13:59:52)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2020-03-23 02:03:28

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: Do pacman search results matching its manual page for --search?

Can someone file a bug report so we remember to clarify the man page.

Offline

#9 2020-03-23 16:17:44

regid
Member
Registered: 2016-06-06
Posts: 201

Re: Do pacman search results matching its manual page for --search?

Allan wrote:

Can someone file a bug report so we remember to clarify the man page.

https://bugs.archlinux.org/task/65951


powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

Board footer

Powered by FluxBB