Bug 246519

Summary: repoquery --whatprovides fails for some directories
Product: [Fedora] Fedora Reporter: Michael Schwendt <bugs.michael>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.1.7-1.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-18 03:21:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Workaround patch none

Description Michael Schwendt 2007-07-02 19:51:02 UTC
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 09:19:13 UTC
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 09:31:39 UTC
Thanks Pamu, It works for me to, so i have added the patch to upstream.

Comment 3 Seth Vidal 2007-08-17 14:18:05 UTC
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 17:08:12 UTC
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 17:22:56 UTC
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 16:51:44 UTC
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-18 03:21:09 UTC
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.