So is there a way to find the package for a file you don’t know the path for? “yum whatprovides” let’s you use a wildcard, e.g. “*/stdio.h”
Of course, I’m not actually looking for stdio.h. I was just using it to try out zypper on something I I knew would be there. I’m actually trying to find quadmath.h.
Thanks. So it sounds like there’s no native OpenSUSE tool that provides deep package inquiries. Perhaps a separate tool? I’m a bit sketchy about installing yum on OpenSUSE.
For packages included in the distribution you could use “pin”, which should be installed by default.
To make it work you need to copy the ARCHIVES.gz from the installation DVD or the online repo to /var/lib/pin/ as instructed when you first run it.
wolfi@amiga:~> pin quadmath.h
grepping /var/lib/pin/ARCHIVES.gz ... please wait
pin 0.38 - package info for quadmath.h
------------------------------------------------------------------
*** no rpm named quadmath.h installed
------------------------------------------------------------------
------------------------------------------------------------------
*** zgrep quadmath.h /var/lib/pin/ARCHIVES.gz
------------------------------------------------------------------
./suse/i586/gcc49-fortran-4.9.0+r211729-2.1.7.i586.rpm: -rw-r--r-- 1 root root 9030 Oct 6 12:59 /usr/lib/gcc/i586-suse-linux/4.9/include/quadmath.h
./suse/i586/gcc48-fortran-4.8.3+r212056-2.2.4.i586.rpm: -rw-r--r-- 1 root root 9030 Oct 6 11:20 /usr/lib/gcc/i586-suse-linux/4.8/include/quadmath.h
./suse/x86_64/gcc49-fortran-4.9.0+r211729-2.1.7.x86_64.rpm: -rw-r--r-- 1 root root 9030 Oct 6 15:42 /usr/lib64/gcc/x86_64-suse-linux/4.9/include/quadmath.h
./suse/x86_64/gcc48-fortran-4.8.3+r212056-2.2.4.x86_64.rpm: -rw-r--r-- 1 root root 9030 Oct 6 12:31 /usr/lib64/gcc/x86_64-suse-linux/4.8/include/quadmath.h
OTOH, you could grep ARCHIVES.gz for the filename manually too.
–provides
Search for packages which provide the search strings. A search string here might be also any symbol provided by a package like /bin/vi, libcurl.so.3, perl(Time::ParseDate), web_browser, e.g. search for the package which provides the shell: zypper se --provides /bin/sh