Red Hat Bugzilla – Bug 246485
returnFileEntries hides /var in "filesystem" package
Last modified: 2014-01-21 17:58:37 EST
Using the sqlite packageSack returnFileEntries() method
with the "filesystem" package reveals that the /var directory
entry is not returned because of a bug.
Debugging has lead to a mistake in sqlitesack.py where
the decodefilenamelist() function creates one directory entry
too much because it decodes '/' as a field separator despite a
comment in the source code which says it must not do that. With
'/' as a separator, the OS root directory '/' is encoded
inappropriately, leading to a wrong number of fields.
Is decoded to:
[u'var', u'usr', u'tmp', u'sys', u'srv', u'selinux', u'sbin', u'root', u'proc',
u'opt', u'mnt', u'media', u'lib', u'home', u'etc', u'dev', u'boot', u'bin', u'',
The latter u'' is duplicate.
As a result, the while loop in the _loadFiles() function processes
two arrays with a non-matching number of elements and ends before
'var' is reached.
$ rpm -q yum
As far as I can tell filesystem is the only impacted package. However, I've
checked in a simple fix to step around this problem in upstream git and by
comparing the outputs of repoquery -l from before and after on filesystem I've
confirmed it is working. It'll be available in 3.2.3. Thanks for the clear report.
yum-3.2.3-1.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.