[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: HELP (RPM - what package a file is from)

On Thu, 2008-11-27 at 09:06 +0000, Anne Wilson wrote:
> On Thursday 27 November 2008 05:10:50 Ralf Corsepius wrote:
> > On Wed, 2008-11-26 at 22:00 -0700, Reg Clemens wrote:
> > > I posted this question several hours ago, but it has never shown up on
> > > the list,- here we go again...
> > >
> > > How do I find out what RPM package a given file is from?
> >
> > rpm -qf <file>
> >
> > > I know I knew how to do this at one time, but Ive reread the RPM
> > > MAN page 3 times and I cant find the right magic.
> >
> > Look again ;)
> >
> > > In particular, I would like to know what package
> > >
> > > 	/usr/bin/htmlview
> >
> > rpm -qf /usr/bin/htmlview
> >
> > will tell you.
> >
> > Ralf
> One of the truly maddening things is the way differences occur in supposedly 
> related distros. 
Actually, the situation is quite simple.

Like with many other programs/packages, different distros use different
variants of rpm and have different different modifications applied.
Sometimes, they even use different code bases (aka. forks), such as in
case of SuSE's, Mandriva's and RH/Fedora's rpm.

However, hardly any of these differences are visible to "normal users"
on the rpm CLI.

>  Take a look at rpm options.  Some time back I was told 'Just 
> type "rpm" and you'll see the options. 'rpm --whatprovides
> packagename' is the obvious choice - but it doesn't tell 
> you what you need to know.  Try 'rpm --provides' - that used to work
> in fedora, but it doesn't now.
Well, --whatprovides and --provides haven't changed for ages, so I don't
understand what you are asking.

>   What about 'rpm --redhatprovides' - that works in 
> mandriva but not in fedora - or does it?
No, it doesn't work on Fedora, because Mandriva uses a completely
different version of rpm than Fedora does.

IIRC, --redhatprovides had been abandoned in RH's/Fedora's rpm a long
time ago, because it's hardly applicable to dynamically evolving distros
such as Fedora.

No idea, why Mandriva has kept it.

>   All I've seen in my experiments is 
> 'no package provides packagename' but that could be because they are stand-
> alone packages.
> How is anyone supposed to find their way through this maze?

Well, like you'd do with any other program :)

1. consult a program's man-pages (man <program>)

2. consult a program's "help" 
GNU standard compliant programs issue it with "<program> --help".
Others support "<program> -h", "<program> -H" or "<program> -?"

3. consult a program's "usage" 
Most programs issue it when being invoked with invalid arguments. 
In most cases, identical to what a program issues in its "help".

4. look into /usr/share/doc/<package>

5. dig the net.

Finally, in case it isn't obvious, while reading documentation, one
should try to develop (at least) a basic understanding how a program
works. Without this, understanding a complex low-level tool's CLI, such
as rpm, is hardly possible.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]