On 07/09/2018 02:51 PM, home user via users wrote:
> A. background:
> Consider this sequence of dnf commands...
> ---------------
> bash.32[~]: dnf provides Xeyes
> Last metadata expiration check: 13 days, 6:37:31 ago on Tue 26 Jun 2018 
> 09:03:52 AM MDT.
> Error: No Matches found
> bash.33[~]: dnf provides x_eyes
> Last metadata expiration check: 13 days, 6:38:00 ago on Tue 26 Jun 2018 
> 09:03:52 AM MDT.
> Error: No Matches found
> bash.34[~]: dnf search --all xeyes
> Last metadata expiration check: 13 days, 6:38:21 ago on Tue 26 Jun 2018 
> 09:03:52 AM MDT.
> No matches found.
> bash.35[~]: dnf provides xeyes
> Last metadata expiration check: 13 days, 6:38:29 ago on Tue 26 Jun 2018 
> 09:03:52 AM MDT.
> xorg-x11-apps-7.7-18.fc27.x86_64 : X.Org X11 applications
> Repo        : @System
> Matched from:
> Provide    : xeyes = 1.1.1
> 
> xorg-x11-apps-7.7-18.fc27.x86_64 : X.Org X11 applications
> Repo        : fedora
> Matched from:
> Provide    : xeyes = 1.1.1
> 
> bash.36[~]:
> ---------------
> This is just to show that
> 1. dnf's "provides" command is sensitive to case and special characters; the 
> spelling must be exact.

Well, yeah. If you're unsure you have to use wildcards.

> 2. dnf's "search" command doesn't necessarily find something even when 
> spelled correctly.

Not true. "provides" looks for files. If you don't specify the path to
the file you're interested in, of course it won't find it. Again,
use wildcards. Example with partial filename:

        [root@prophead ~]# dnf whatprovides liblasem
        Last metadata expiration check: 2:44:58 ago on Mon 09 Jul 2018 12:43:02
PM PDT.
        Error: No Matches found

Example with full path:

        [root@prophead ~]# dnf whatprovides /usr/lib64/liblasem-0.4.so.4.0.3
        Last metadata expiration check: 2:45:16 ago on Mon 09 Jul 2018 12:43:02
PM PDT.
        lasem-0.4.3-8.fc28.x86_64 : A library for rendering SVG and Mathml,
implementing a DOM like API
        Repo        : @System
        Matched from:
        Filename    : /usr/lib64/liblasem-0.4.so.4.0.3

        lasem-0.4.3-8.fc28.x86_64 : A library for rendering SVG and Mathml,
implementing a DOM like API
        Repo        : fedora
        Matched from:
        Filename    : /usr/lib64/liblasem-0.4.so.4.0.3

Example with wildcards:

        [root@prophead ~]# dnf whatprovides "*liblasem*"
        Last metadata expiration check: 2:48:29 ago on Mon 09 Jul 2018 12:43:02
PM PDT.
        lasem-0.4.3-8.fc28.x86_64 : A library for rendering SVG and Mathml,
implementing a DOM like API
        Repo        : @System
        Matched from:
        Provide    : liblasem-0.4.so.4()(64bit)

        lasem-0.4.3-8.fc28.i686 : A library for rendering SVG and Mathml,
implementing a DOM like API
        Repo        : fedora
        Matched from:
        Provide    : liblasem-0.4.so.4

        lasem-0.4.3-8.fc28.x86_64 : A library for rendering SVG and Mathml,
implementing a DOM like API
        Repo        : fedora
        Matched from:
        Provide    : liblasem-0.4.so.4()(64bit)

        lasem-devel-0.4.3-8.fc28.i686 : Development files for lasem
        Repo        : fedora
        Matched from:
        Other       : *liblasem*

        lasem-devel-0.4.3-8.fc28.x86_64 : Development files for lasem
        Repo        : fedora
        Matched from:
        Other       : *liblasem*

Repos called "@System" means THAT RPM is already installed.

> I already have "xeyes", the above is merely demonstration.
> 
> B. the question:
> If I want to find a tool, application, etc., and I don't know its exact 
> spelling, and trying all case and special character possibilities is not 
> practical, how do I search for it using dnf, so I can then install it (or 
> discover that I already have it)?

If you don't use wildcards, it will try to match EXACTLY what you
specify--just like any command and as I demonstrated in the first two
examples above.

If you do use wildcards, you have to put the search string in quotes so
the shell doesn't expand the wildcards first (this is something many
people using ANY command forget--if you want to pass the wildcards to
the command itself, quote them to keep the shell from expanding them!)

You should also note that wildcard searches (as the third one above is)
take MUCH longer as dnf has to do pattern matching on the filelists the
RPMs provide.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ri...@alldigital.com -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-               500: Internal Fortune Cookie Error                   -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/message/VXUEFYD47PHFUIRPBZPW4BMGWKJUZ3JE/

Reply via email to