Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

yum provides something

Wed Jun 19, 2013 1:31 pm

I'm not very knowledgeable about yum - as expressed in my other thread, I'm working out the translations between Debian-speak and Fedora-speak.

If I do something like: yum provides rxvt
I get sensible output. Note that I installed rxvt myself recently (via: yum install rxvt)

But if I do "yum provides ls" (which certainly should work, right?), I get:


[[email protected] ]# yum provides ls
Loaded plugins: langpacks, presto, refresh-packagekit
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2
Trying other mirror.
http://downloads.raspberrypi.org/pidora ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://downloads.raspberrypi.org/pidora ... sqlite.bz2
Trying other mirror.
Error: failure:
repodata/a8773c03b284f4d53cf814b2693b6faabb717efff2bc8c2e2322f5be7df4f7c5-filelists.sqlite.bz2
from pidora: [Errno 256] No more mirrors to try.
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2
http://downloads.raspberrypi.org/pidora ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://downloads.raspberrypi.org/pidora ... sqlite.bz2

What's up with that?
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

agreene
Posts: 39
Joined: Fri Sep 14, 2012 6:47 pm

Re: yum provides something

Wed Jun 19, 2013 5:45 pm

Joe Schmoe wrote:I'm not very knowledgeable about yum - as expressed in my other thread, I'm working out the translations between Debian-speak and Fedora-speak.

If I do something like: yum provides rxvt
I get sensible output. Note that I installed rxvt myself recently (via: yum install rxvt)

But if I do "yum provides ls" (which certainly should work, right?), I get:


[[email protected] ]# yum provides ls
Loaded plugins: langpacks, presto, refresh-packagekit
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2
Trying other mirror.
http://downloads.raspberrypi.org/pidora ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://downloads.raspberrypi.org/pidora ... sqlite.bz2
Trying other mirror.
Error: failure:
repodata/a8773c03b284f4d53cf814b2693b6faabb717efff2bc8c2e2322f5be7df4f7c5-filelists.sqlite.bz2
from pidora: [Errno 256] No more mirrors to try.
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://pidora.proximity.on.ca/pidora/re ... sqlite.bz2
http://downloads.raspberrypi.org/pidora ... sqlite.bz2:
[Errno 14] HTTP Error 404 - Not Found :
http://downloads.raspberrypi.org/pidora ... sqlite.bz2

What's up with that?
Hi, Joe

That most likely happened because the repo was being updated at the time you ran the command so when a new package gets added the repo metadata changes, so koji which is the build system we are using for pidora creates a new repo with the updated packages. During this time yum won't be able to query the repo for the information you requested. This is just one of three possible reasons for this but the bottom line is it was a repo issue and had nothing do with yum. If this happens in the future to you just wait a hour or so it usually means something is being updated or added to the repo.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: yum provides something

Wed Jun 19, 2013 6:10 pm

I'd like to believe this - really I would - but I don't think I can.

Because I just now tested and, as reported previously, I get sensible output from "yum provides rxvt", but not from anything else (including "ls" or "nothingthatexists")

We need an explanation that explains why it works with things that I've personally installed (I tested with something else that I've installed other than rxvt - and it worked, too) - but fails (with an ugly and weird error message) for things that were installed in the base system.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
jojopi
Posts: 3088
Joined: Tue Oct 11, 2011 8:38 pm

Re: yum provides something

Wed Jun 19, 2013 6:35 pm

rxvt is being treated as a package name and not as a dependency feature. (That behaviour does not appear to be documented, nor does it seem very useful.)

Incidentally, although most versions of yum will accept the name of a command, to search for a file that is not explicitly named as a dependency feature you may need to use a glob pattern:

Code: Select all

yum provides "*bin/rxvt"
You will probably find that this fails, because it needs the filelists. To fix that, have you tried "yum clean all"?

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: yum provides something

Wed Jun 19, 2013 7:24 pm

I didn't understand your post, jojo, but I suspect I wasn't meant to.

But it sounds to me like you agree with me that:
1) It's broken (the weird error msg)
2) It isn't that there is something wrong "out there" (And the reason I say this is because it happens consistently over a long span of time)
3) It should work better (design problem(s)).
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

oystercatcher
Posts: 8
Joined: Wed Nov 16, 2011 10:32 am

Re: yum provides something

Wed Jun 19, 2013 11:05 pm

I haven't used yum provides all that much but I tested your example and it does fail
with http error 404 on a long list of mirrors tying up the terminal the entire time.
forums.fedoraforum.org would be a good place to inquire about the behavior.

from man yum

provides or whatprovides
Is used to find out which package provides some feature or file.
Just use a specific name or a file-glob-syntax wildcards to list
the packages available or installed that provide that feature or
file.

macemoneta
Posts: 59
Joined: Sun Oct 23, 2011 12:47 pm
Contact: Website

Re: yum provides something

Wed Jun 19, 2013 11:58 pm

Just wanted to note that 'yum provides' works on both my Fedora x86_64 desktop, as well as on the Raspberry Pi Fedora 18 Remix:

Code: Select all

[[email protected] ~]# yum provides /bin/ls
updates/18/arm/metalink                            | 2.2 kB  00:00:00     
coreutils-8.17-6.fc18.armv5tel : A set of basic GNU tools commonly used in shell scripts
Repo        : fedora
Matched from:
Filename    : /bin/ls

coreutils-8.17-8.fc18.armv5tel : A set of basic GNU tools commonly used in shell scripts
Repo        : updates
Matched from:
Filename    : /bin/ls

coreutils-8.17-8.fc18.armv5tel : A set of basic GNU tools commonly used in shell scripts
Repo        : @updates
Matched from:
Filename    : /bin/ls

User avatar
jojopi
Posts: 3088
Joined: Tue Oct 11, 2011 8:38 pm

Re: yum provides something

Thu Jun 20, 2013 5:16 am

Joe Schmoe wrote:I didn't understand your post, jojo, but I suspect I wasn't meant to.
I did not intend it to be hard to understand, but I did intend it be a little unconvincing. I have not yet tried Pidora, whereas agreene talked in the first person about building it.

On Fedora, repo mirrors can be out of sync with one other, but that is not generally a problem because yum tries as many as necessary. I have never heard of a repo being internally inconsistent so that you have to wait an hour. I did not know whether to believe that is possible in Pidora or not.

The file your yum was looking for, a877…filelists.sqlite.bz2, does not exist in the repo because it is now called 4f88…filelists.sqlite.bz2. The new name is given correctly in the repomd.xml in the repo, and the timestamps on the two files are within a minute, so I cannot see how the repo could have been to blame.

My guess is that your yum had an old copy of repomd.xml in /var/cache/yum/armv6hl/18/pidora/, but a missing or incomplete copy of the corresponding a877…filelists.sqlite.bz2. That is also unusual, but it could happen if yum was interrupted. I also wonder if an inaccurate clock can make this more likely.

If the problem is due to inconsistent or partial-and-out-of-date caches, then "yum clean all" should fix it.

By the way, to find out about files and packages that are already installed, you can use the local rpm database instead of the remote yum repo:

Code: Select all

rpm -qf /bin/ls
rpm -ql coreutils
(Debian equivalents are "dpkg -S" and "dpkg -L".)

User avatar
joan
Posts: 14474
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: yum provides something

Thu Jun 20, 2013 9:43 am

Do you know if

yum provides ls

and

yum provides /bin/ls

are equivalent?

macemoneta
Posts: 59
Joined: Sun Oct 23, 2011 12:47 pm
Contact: Website

Re: yum provides something

Thu Jun 20, 2013 11:25 am

"yum provides ls" and "yum provides /bin/ls" are not equivalent.

The second will find packages that provide a specific file (/bin/ls), while the first will find packages that provide a file of a given name (e.g., /usr/bin/ls, /bin/ls).

Both queries work on my systems.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: yum provides something

Thu Jun 20, 2013 1:14 pm

"yum provides ls" and "yum provides /bin/ls" are not equivalent.
They are not "equivalent", but they are definitely related - one is a superset of the other. In fact, one might say that they are related in the same way that running "ls" and running "/bin/ls" (from the shell prompt) are related.

Anyway, following the suggestions in this thread, I did:

1) yum clean all

2) yum provides ls

and things seem to be working again. Note that the first time you run "yum provides" after doing the "clean" command, it spends a lot of time downloading new control files - before generating the requested output.

So, I guess the problem was "out there", after all.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Return to “Pidora / Fedora”