Mailinglist Archive: opensuse-buildservice (177 mails)

< Previous Next >
Re: [opensuse-buildservice] RPM naming conventions in OBS


On 15/12/2016 18:01, Roger Oberholtzer wrote:
I have a script that makes a list of all the RPMs that must be
installed to satisfy a directory full of binary programs. The RPMs are
already installed. The purpose of the script is to get the list of
RPMs so they can easily be installed on a different system.

I have no trouble finding the name of the RPM with the needed libraries.

For example,

rpm -q --queryformat "%{NAME}\n" --whatprovides /usr/lib/libsndfile.so.1

reports:

libsndfile1

So, "zypper in libsndfile1" does the deed.

My problem is when I want to install the -devel package as well. In
this case, I need to install libsndfile-devel. Note the missing '1' in
the name.

My question is, given that I know the name of the library RPM, how can
I derive the name of the -devel package? Sometimes it is just to add
-devel to the name. Sometimes not.

Is there some brilliant way to do this reliably?

Sorry I'm late, try zypper in `rpm -q --whatrequires libsndfile1|grep libsndfile |cut -d - -f 1,2`
Regards
Dave P
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References