10

I am thinking on some like Contents-<arch>.gz on Debian. A network service were also okay. Does it exist?

Simple elaboration: For example, we need a binary named exampletool, which we know very good from other distributions or operation systems. We want to install that, for example, with zypper. But zypper can only install a package. To find out, in which package can we find the required exampletool binary, we need to do practically a search, and ideally a fast, indexed search in the file list of the currently not installed, but in the repositories available packages. On debian, there is an index file in the package repositories named Contents-amd64.gz, in which we can find the required package with a single zgrep command. I am looking for some similar, single-command solution for OpenSUSE, too. If there is none, a web service were also okay for the same functionality.

  • I'm afraid that I don't understand your question. Can you please explain it better? – SailorCire Sep 29 '14 at 1:22
  • @SailorCire If you find some lingual problem, fixing that is always a very useful help (maybe even honor) for a non-native speaker. I elaborated my question, hopefully it is soon more clear. – peterh Sep 29 '14 at 8:04
  • The elaboration clears everything up for me. I've also put the question in the answer for search bots to find. – SailorCire Sep 29 '14 at 20:20
7

To search from all available packages to find a particular file, you can use the option wp or se --provides --match-exact as an example:

zypper se --provides --match-exact hg

You will see output similiar to the following:

Loading repository data...
Reading installed packages...

S | Name      | Summary                  | Type   
--+-----------+--------------------------+--------
  | mercurial | Scalable Distributed SCM | package

From that point you can install the package through a standard zypper install

zypper in mercurial

It should be noted that zypper wp is obsolete and may no longer be available.

4

To the googlers of the future: next to @SailorCire 's wonderful solution :-), there is also a tool named scout, which is able to search in practically everything, we can find rpm-s for a binary just as we can find the jars for a given java class.

For example, we can use scout's bin command to find out what package provides the hg executable:

scout bin hg

The result of this search is the mercurial package:

 repository      | package   | path     | binary
-----------------+-----------+----------+--------
 zypp (repo-oss) | mercurial | /usr/bin | hg    
1

I'm using Gecko Linux XFCE. I opened Yast2 and installed gnome-search-tool and gnome-shell-search-provider-nautilus. It works fine, just like Catfish.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.