You are viewing illiterat

James Antill - A few things you might not know about RHEL-6.1+ yum

May. 19th, 2011

02:02 pm - A few things you might not know about RHEL-6.1+ yum

Previous Entry Share Next Entry

Comments:

[User Picture]
From:thargol
Date:May 19th, 2011 08:59 pm (UTC)
(Link)
It would be nice if you could restore "yum provides" to its previous working state. If I say "yum provides foo", it's because I want to know which package provides file foo. If there happens to be a feature called foo, then by all means show packages that provide that as well. But don't force me to do "yum provides */foo" just because I happen to know I'm looking for a file. I suppose I really should log that as a bug. But then again, 99% of my bug reports are ignored anyway, so I'm losing faith in that approach somewhat.
(Reply) (Thread)
[User Picture]
From:illiterat
Date:May 20th, 2011 07:18 pm (UTC)

provides == fileprovides?

(Link)
If I say "yum provides foo", it's because I want to know which package provides file foo.

The problem is twofold: 1) From what I've seen that is the (much) less common usage. 2) If you assume people want to check for files by default, you need to load the "filelists" data from all repos. ... which means that everybody who doesn't want to do that (Eg. most people) will then shout at me for wasting their time/bandwidth/etc.

I'd thought about doing some "primary-file-lookup" type command, mainly for command lookup (where you don't need filelists) but that could be extended ... what files do you lookup frequently?

(Reply) (Parent) (Thread)
[User Picture]
From:thargol
Date:May 23rd, 2011 11:07 am (UTC)

Re: provides == fileprovides?

(Link)
From what I've seen that is the (much) less common usage

I guess we're just exposed to different demographics then, because I've never seen anyone use it for anything else, myself included.

what files do you lookup frequently?

So a typical example would be pulling a repo for a new project at work. To give a real life example from last week, trying to run the app in question gave the following python error:
ImportError: No module named matplotlib
So I ran yum provides "*/matplotlib" to find out which package I need to install. But in general, any app that fails to find a file for any particular reason tends to push me in the direction of yum provides, whether it's a missing shared object or a config or similar file that something looks for at run time. Is it something I use every day? No, not even close, but I'd say once every few weeks, which makes the */foo an annoyance when foo used to work just fine. I'd be happier with yum fileprovides than the current wildcard hack as a means to tell yum that I really am looking for a file, so it needs to load filelists.
(Reply) (Parent) (Thread)
[User Picture]
From:illiterat
Date:May 24th, 2011 05:05 pm (UTC)

Re: provides == fileprovides?

(Link)
I guess we're just exposed to different demographics then, because I've never seen anyone use it for anything else, myself included.
Fair enough.
So I ran yum provides "*/matplotlib" to find out which package I need to install. But in general, any app that fails to find a file for any particular reason tends to push me in the direction of yum provides, whether it's a missing shared object or a config or similar file that something looks for at run time.
So I just added: http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=6756b86f33f5173a035671ae748f61a1192eef1a ...which looks for "commands" and python modules, if the "normal" provides lookup fails. This is fast enough, I doubt anyone will care (although it might trigger filelists downloads). Adding more sources is possible (Eg. /etc), if you have a need for them (and we can do it easily -- adding "perl"/"ruby"/etc. might be useful, but I'm not sure how easy it would be). Worst case we could even have a configurable list of directories.
(Reply) (Parent) (Thread)
From:(Anonymous)
Date:June 8th, 2011 10:48 pm (UTC)

Re: provides == fileprovides?

(Link)
A two-fold search is definitely the cleanest way to go!

Great job!
Looking forward to it!

(Reply) (Parent) (Thread)