Bug 246485 - returnFileEntries hides /var in "filesystem" package
returnFileEntries hides /var in "filesystem" package
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-07-02 13:08 EDT by Michael Schwendt
Modified: 2014-01-21 17:58 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-08-13 09:41:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Schwendt 2007-07-02 13:08:21 EDT
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
Comment 1 Seth Vidal 2007-08-13 09:41:01 EDT
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.
Comment 2 Fedora Update System 2007-08-24 01:34:14 EDT
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.

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