Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 452276 - SQLite file provides fails to match
Summary: SQLite file provides fails to match
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-06-20 17:21 UTC by Darrell R. Kresge
Modified: 2014-01-21 23:03 UTC (History)
5 users (show)

Fixed In Version: yum-3.2.17-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-08-07 19:28:24 UTC

Attachments (Terms of Use)

Description Darrell R. Kresge 2008-06-20 17:21:00 UTC
Description of problem:

When depsolving for uninstalled providers based on filename, or executing 'yum provides 
/path/to/file', no matches are returned 

Version-Release number of selected component (if applicable):


How reproducible:

Consistently with a new installation and no plugins enabled

Steps to Reproduce:

With the 'provides' subcommand:

# yum -d1 provides /etc/mime.types
# yum -d0 install mailcap -y
# yum -d1 provides /etc/mime.types
mailcap.noarch : Associates helper applications with particular file types.

With the 'install' subcommand: (httpd requires /etc/mime.types)

# yum -d0 install httpd
httpd-2.2.3-5.x86_64 from leenux-fc-base has depsolving problems
  --> Missing Dependency: /etc/mime.types is needed by package httpd-2.2.3-5.x86_64 (leenux-fc-
Error: Missing Dependency: /etc/mime.types is needed by package httpd-2.2.3-5.x86_64 (leenux-fc-
# yum -d0 install mailcap -y
# yum -d0 install httpd
Is this ok [y/N]: 
Exiting on user Command

Actual results:

mailcap is not found as a provider of /etc/mime.types

Additional info:

metadata is valid:

# gunzip -c filelists.xml.gz | grep -C3 /etc/mime.types
<package pkgid="337ea5ff5bfe228beb194aa45bcb1e618d702d2c" name="mailcap" arch="noarch">
  <version epoch="0" ver="2.1.23" rel="1.fc6"/>

sqlite> select,P.version,P.pkgKey from packages P, files F where P.pkgKey=F.pkgKey and'/etc/mime.types';

Possible remedy: has a logic error in short circuiting file based provider lookup.  Globs and filenames 
should both proceed to search filelists.  The current test disallows file lookups which are not globs.

---	(revision 47366)
+++	(working copy)
@@ -761,7 +761,7 @@
         # If it's not a provides or a filename, we are done
         if prcotype != "provides":
             return results
-        if not glob or name[0] != '/':
+        if not glob and name[0] != '/':
             return results
         # If it is a filename, search the primary.xml file info

Comment 1 James Antill 2008-08-07 19:28:24 UTC
 This was fixed in an update, at least 3.2.17-2 will fix it (it was fixed before that but I can't remember which nevr exactly).

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