Home_greyopenFATE - openSUSE feature tracking > #308437
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

zypper search in package content

Feature state

openSUSE Distribution


Zypper search should be extended to search also in a filelist of package, which can make webpin or package pin obsolete.

zypper search --search-content gpm.h

Will return all packages matching 'gpm.h' string in a filelist.


icons/user_comment.png R. M. wrote: (7 years ago)

webpin still would allow searching inside a not installed package

icons/user_comment.png T. E. wrote: (7 years ago)

This feature is especially important when you're compiling software. For example today I was building something and gcc complained that glibconfig.h was missing. There was no way to find out which of the hundreds of -devel packages provided this file, except for guessing (it was in glib2-devel). Many header files are much more difficult to find than glib ones.

In Mandriva, which has this feature (see http://wiki.mandriva.com/en/Tools/urpmi#urpmf ), I could've just done:

urpmf glibconfig.h

and it would've said 'glib2-devel'

icons/user_comment.png T. K. wrote: (7 years ago)

Very important feature, very much needed! zypper wp provides some of the functionality but is too crippled to be useful. For example

zypper wp libpng12.so    # No providers of 'libpng12.so' found.

zypper wp libpng12.so.0     # finds libpng12-0

zypper wp libpng12.so.0.39.0     # No providers of 'libpng12.so.0.39.0' found.

$ rpm -ql libpng12-0



$ rpm -ql libpng-devel | grep so



Even the man page is not quite correct as it says:

   The  NAME  component  of a capability is not only a package name but

   any   symbol   provided   by   packages:   /bin/vi,    libcurl.so.3, ...

However we get:

zypper wp /bin/vim     # No providers of '/bin/vim' found.

I understand the reason for this behaviour is that zypper does not save the entire file list of each rpm package (rpm -ql) in the repodata directory but only what each package provides (rpm -q --provides).

$ rpm -q --provides libpng12-0

libpng = 1.2.39-2.2




libpng12-0 = 1.2.39-2.2

libpng12-0(x86-64) = 1.2.39-2.2

$ rpm -q --provides libpng-devel

libpng-devel = 1.2.39-2.2

libpng-devel(x86-64) = 1.2.39-2.2

I would very much recommend for zypper to save the entire file list (rpm -ql) of each package in the repodata directory

/var/cache/zypp/raw/<repo name>/repodata/....xml.gz

That will inflate the file sizes quite a bit but that's just a small price to pay for essential information.

icons/user_comment.png L. M. wrote: (7 years ago)

I find this feature really important. See what urpmq (urpmi from mandriva) can do. This is really useful for developers and powerusers.

This is just what zypper is missing.

icons/user_comment.png C. M. wrote: (6 years ago)

Yes, this would save a lot of time when there is a missing header file in a failed compilation. I've just had this
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: Datei oder Verzeichnis
nicht gefunden
make[5]: *** [_muldi3.o] Fehler 1

In fact, this error motivated me to look for an option to 'zypper search' which would do the search in the file list, just to find out that there is none. Googling more about it and I found this feature request :-)

icons/user_comment.png H. J. wrote: (6 years ago)

any updates on this one?

icons/user_comment.png M. B. wrote: (6 years ago)

Yes please add this feature. It is one very important feature to help newcomers to pick up openSUSE.

icons/user_comment.png H. B. wrote: (5 years ago)

In the same line of querying, I'd realy like to see an option to show me what *repository* the current installed file came from.
The package of course is important, but if 'zypper se package' doesn't show up anything on a fresh machine, I have to add repositories I already added to other boxes, and instead of just blindly adding all repositories that box has enabled, I'd like to just add what I need.

Something like

$ zypper wr /usr/bin/di
di-4.31-4.1.x86_64 comes from
http://packman.iu-bremen.de/suse/openSUSE_12.1 (Packman2)

icons/user_comment.png R. Ø. wrote: (5 years ago)

This does seem like such an obvious missing feature, so it should be possible in openSUSE. Pretty much every major distro allows for something like this, e.g.

Fedora = "yum provides '*/[file]'"
Mandriva = "urpmf [file]"
Debian based distros/APT = "apt-file search [file]"
Slackware = "slackpkg file-search [file]"
ArchLinux = "pkgfile -si '*/[file]'"

icons/user_comment.png R. A. wrote: (4 years ago)

Very important feature, i think its a great idea.

icons/user_comment.png S. L. wrote: (10 months ago)

As far as I know zypper still has no comparable feature is that right?

I miss this quite often when I try to compile something and get something like "could not find XYZ.h"

icons/user_comment.png D. L. wrote: (5 months ago)

There exists
zypper search --file-list
So I think this feature request could be considered done and what is asked for is already possible


icons/user_comment.png S. W. wrote: (5 months ago)

> Agreed?
I disagree. zypper does only know of installed packages.

Do you know apt-file? After downloading the indices it allows searching for all paths (or parts of paths) in all available packages. This is very powerful and extremely helpful when searching for libraries, as also noted above two times.

Last change: 2 weeks ago
Score: 45
  • Negative: 1
  • Neutral: 1
  • Positive: 46
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint