Bug 431170 - Needlessly downloads filelists metadata
Needlessly downloads filelists metadata
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-01 01:12 EST by Bill Nottingham
Modified: 2014-03-16 23:12 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-13 10:04:27 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)

  None (edit)
Description Bill Nottingham 2008-02-01 01:12:49 EST
Description of problem:

Bear with me. It's late
.
yum-3.2.10-3.fc9.noarch

Right now, we have broken deps in rawhide. Yum tries to resolve them to do an
update:

Reading Local RPMDB
Setting up Package Sacks
Setting up Upgrade Process
Building updates object
Resolving Dependencies
1201845860.38
--> Running transaction check
---> Package libgcj.x86_64 0:4.3.0-0.7 set to be updated
Checking deps for libgcj.x86_64 0-4.3.0-0.7 - u
looking for (u'libc.so.6(GLIBC_2.3.4)(64bit)', None, (None, None, None)) as a
requirement of libgcj.x86_64 0-4.3.0-0.7 - u
looking for (u'libgcj-tools.so.9()(64bit)', None, (None, None, None)) as a
requirement of libgcj.x86_64 0-4.3.0-0.7 - u
looking for (u'libgcj.so.9()(64bit)', None, (None, None, None)) as a requirement
of libgcj.x86_64 0-4.3.0-0.7 - u
Checking deps for libgcj.x86_64 0-4.1.2-36 - None
libgconf-java - 2.12.4-9.fc8.x86_64 requires: libgcj.so.8rh()(64bit)
--> Processing Dependency: libgcj.so.8rh()(64bit) for package: libgconf-java
Needed Require is not a package name. Looking up: libgcj.so.8rh()(64bit)
Potential Provider: libgcj.x86_64 0:4.1.2-36
Mode is u for provider of libgcj.so.8rh()(64bit): libgcj.x86_64 0:4.1.2-36
Mode for pkg providing libgcj.so.8rh()(64bit): u
Cannot find an update path for dep for: libgcj.so.8rh()(64bit)
libgcj.so.8rh()(64bit) check
Searching pkgSack for dep: libgcj.so.8rh()(64bit)
glib-java - 0.2.6-11.fc9.x86_64 requires: libgcj.so.8rh()(64bit)
--> Processing Dependency: libgcj.so.8rh()(64bit) for package: glib-java
Needed Require has already been looked up, cheating
Potential Provider: libgcj.x86_64 0:4.1.2-36
Mode is u for provider of libgcj.so.8rh()(64bit): libgcj.x86_64 0:4.1.2-36
Mode for pkg providing libgcj.so.8rh()(64bit): u
Cannot find an update path for dep for: libgcj.so.8rh()(64bit)
libgcj.so.8rh()(64bit) check
Searching pkgSack for dep: libgcj.so.8rh()(64bit)
libgtk-java - 2.8.7-5.fc8.x86_64 requires: libgcj.so.8rh()(64bit)
--> Processing Dependency: libgcj.so.8rh()(64bit) for package: libgtk-java
Needed Require has already been looked up, cheating
Potential Provider: libgcj.x86_64 0:4.1.2-36
Mode is u for provider of libgcj.so.8rh()(64bit): libgcj.x86_64 0:4.1.2-36
Mode for pkg providing libgcj.so.8rh()(64bit): u
Cannot find an update path for dep for: libgcj.so.8rh()(64bit)
libgcj.so.8rh()(64bit) check
Searching pkgSack for dep: libgcj.so.8rh()(64bit)
cairo-java - 1.0.5-8.fc8.x86_64 requires: libgcj.so.8rh()(64bit)
--> Processing Dependency: libgcj.so.8rh()(64bit) for package: cairo-java
Needed Require has already been looked up, cheating
Potential Provider: libgcj.x86_64 0:4.1.2-36
Mode is u for provider of libgcj.so.8rh()(64bit): libgcj.x86_64 0:4.1.2-36
Mode for pkg providing libgcj.so.8rh()(64bit): u
Cannot find an update path for dep for: libgcj.so.8rh()(64bit)
libgcj.so.8rh()(64bit) check
Searching pkgSack for dep: libgcj.so.8rh()(64bit)

At this point, yum starts downloading the filelists metadata, even though there
is no need. Backtrace is:

  File "/usr/share/yum-cli/yummain.py", line 151, in main
    (result, resultmsgs) = base.buildTransaction() 
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 577, in
buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 751, in resolveDeps
    for po, dep in self._checkFileRequires():
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 967, in
_checkFileRequires
    if not self.tsInfo.getOldProvides(filename) and not
self.tsInfo.getNewProvides(filename):
  File "/usr/lib/python2.5/site-packages/yum/transactioninfo.py", line 413, in
getNewProvides
    for pkg, hits in self.pkgSack.getProvides(name, flag, version).iteritems():
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 255, in
getProvides
    return self._computeAggregateDictResult("getProvides", name, flags, version)
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 416, in
_computeAggregateDictResult
    sackResult = apply(method, args)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 620, in
getProvides
    return self._search("provides", name, flags, version)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 40, in newFunc
    return func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 603, in _search
    for pkg in self.searchFiles(name, strict=True):
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 40, in newFunc
    return func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 391, in
searchFiles
    self.populate(repo, mdtype='filelists')

Basically, it already knows that it can't upgrade libgcj, because of failed
deps. Yet it still checks that removing the old libgcj won't break file deps.
Can't this be short-circuited?
Comment 1 Bill Nottingham 2008-02-01 01:18:35 EST
The simple solution is changing the code in resolveDeps() from:

# check global FileRequires
if CheckRemoves:

to:

# checl global FileRequires
if CheckRemoves and not errors:

Not sure if this is 100% correct, though.
Comment 2 Bill Nottingham 2008-02-01 08:53:37 EST
OK, a shorter version of this report:

If a package that provides a not-in-primary filedep is being upgraded, we
*always* download the filelists, to verify that the new version of the package
is providing that same file dep for currently-installed packages that require it.

The issue here is that we do this verification even after we've determined we
can't do the upgrade due to other dependency problems.

Hopefully, that makes more sense than the trace/traceback.
Comment 3 Seth Vidal 2008-03-12 12:47:00 EDT
Not sure we can fix this one on the bug day but
YUMBUGDAY
Comment 4 Florian Festi 2008-03-13 10:04:27 EDT
Yum is supposed to give a as complete error report as possible to allow the user
to come up with a working command line. Additionally should --skip-broken allow
you to do the update even if there are problems.

So if you are not going to skip your operation completely and wait for the
repository to be fixed you will need to download the filelists anyway.

So the benefit on a short circuit does not outweight the incomplete error report
and the risk of breaking skip-broken or plugins that may rely on a complete
error report.

Sorry!

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