Skip to content

pkg search -e does not work properly #1409

Closed

Description

@amontalban

I'm trying to use pkg search exact search but it does not work:

[root@devserver ~]# pkg search sudo
gnome-sudoku-3.18.2            Sudoku game for gnome
gnustep-sudoku-0.7_3           Sudoku solver and generator
ksudoku-4.14.3                 Sudoku game
p5-Sudo-0.33_1                 Perl extension for running a command line sudo
py27-django-sudo-1.2.0         Sudo mode is an extra layer of security for Django
pythonsudoku-0.13_7            Text and graphical program to create or resolve Sudokus
sshsudo-1.0                    Bash script to run sudo command on multiple remote computers
sudo-1.8.16                    Allow others to run commands as root
sudoku-sensei-02.00            Enjoy playing with Sudoku boards designed by yourself
sudoku_solver-1.20             Sudoku Solver in C
sudoscript-2.1.2               Audited shells in Perl with sudo(8) and script(1)

According to pkg help search

     -e, --exact
                 pattern should be an exact match against the search field.

However:

[root@devserver ~]# pkg search -e sudo
[root@devserver ~]# 

But this "works":

[root@devserver ~]# pkg search -e sudo-1.8.16
sudo-1.8.16                    Allow others to run commands as root

I think it should match against package name and not against the whole line (packagename-version)

Am I doing something wrong or this is the intended usage?

Thanks!

Activity

  1. infracaninophile commented on Apr 7, 2016

    @infracaninophile
    Member

    Try:

    pkg search -S name -e sudo
    

    The default is to search against pkg-name which as you've discovered contains the version number as well. (Absent the heuristic that searches against package origins when there's a '/' character in the search string.)

  2. amontalban commented on Apr 7, 2016

    @amontalban
    Author

    @infracaninophile Thanks! I figured this out on my own and forgot to close the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions