Bug 246519 - repoquery --whatprovides fails for some directories
repoquery --whatprovides fails for some directories
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-02 15:51 EDT by Michael Schwendt
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version: 1.1.7-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-17 23:21:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Workaround patch (1.21 KB, patch)
2007-08-17 05:19 EDT, Panu Matilainen
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2007-07-02 15:51:02 EDT
Running repoquery on /usr, /var and other directories fails:

$ sudo repoquery --whatprovides /usr
Loading "installonlyn" plugin
Importing additional filelist information
$
$ repoquery --whatprovides /bin /var /usr /home /opt /tmp
Loading "installonlyn" plugin
Importing additional filelist information
$

But:

$ sudo repoquery --whatprovides /var/run
Loading "installonlyn" plugin
Importing additional filelist information
filesystem-0:2.4.6-1.fc7.i386
$

Expected results:

All directories are provided by the "filesystem" package.

$ sudo repoquery --whatprovides /var
Loading "installonlyn" plugin
Importing additional filelist information
filesystem-0:2.4.6-1.fc7.i386
Comment 1 Panu Matilainen 2007-08-17 05:19:13 EDT
Created attachment 161723 [details]
Workaround patch

This is arguably a bug in yum as repoquery just calls yum methods to look
things up. Curiously enough it seems that while returnPackagesByDep() fails to
find the / level directories, searchPackageProvides() does find them. Attached
patch does that (plus renames a method to avoid naming conflict and recursion
to death), seems to fix the issue for me, but it might not be a bad idea to
figure why are those two things behaving differently here.
Comment 2 Tim Lauridsen 2007-08-17 05:31:39 EDT
Thanks Pamu, It works for me to, so i have added the patch to upstream.
Comment 3 Seth Vidal 2007-08-17 10:18:05 EDT
Yes, this is a bug in yum. It's also been fixed - it had to do with the
filesystem package getting one too many '/'s added to its filelist.

it's fixed in git.

Comment 4 Panu Matilainen 2007-08-17 13:08:12 EDT
I remember seeing you mention it's fixed in git but it doesn't look that way
(../yum is up-to-date git repo, yum-utils likewise but with the above workaround
patch reverted):
[pmatilai@turre yum-utils]$ PYTHONPATH=../yum ./repoquery.py --whatprovides /var
[pmatilai@turre yum-utils]$

Comment 5 Seth Vidal 2007-08-17 13:22:56 EDT
okay then maybe this isn't the same bug. The one I was dealing with was:

repoquery -l filesystem didn't list /var

it does now, though.
So maybe these are not related, though they sure seem like it.
Comment 6 Fedora Update System 2007-09-10 12:51:44 EDT
yum-utils-1.1.7-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2007-09-17 23:21:09 EDT
yum-utils-1.1.7-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.