Bug 440428
| Summary: | yum-fastestmirror doesn't care about -C flag | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Konstantin Zemlyak <zart> |
| Component: | yum-utils | Assignee: | Luke Macken <lmacken> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 8 | CC: | james.antill, pfrields, pmatilai, sdeasey, tim.lauridsen |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 1.1.14-4.fc9 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-07-08 17:18:49 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: | |||
|
Description
Konstantin Zemlyak
2008-04-03 14:39:29 UTC
yum-fastestmirror should cache it's results such that two back-to-back calls to yum list do not run the mirror check twice. yum-fastestmirror should not be invoked at all, even if it's cache is out of data, if the yum command does not require network access, such as yum info for an already installed package. yum-fastestmirror should fail silently when the network is not available. For example, yum list may decide to check the package list if not done recently, and this may cause yum-fastestmirror to check the mirrors if not done recently. If the route to the internet for the local network is down, yum list should work with the cached list of packages, perhaps with a warning. This means that yum-fastestmirror must be driven by the underlying yum commands need for network access -- it cannot simply be invoked unconditionally at yum startup time. I believe I fixed this issue. Could you please test by throwing this in /usr/lib/yum-plugins http://lmacken.fedorapeople.org/fastestmirror.py Thanks! Tested, fails. Brought down my external network interface, then tried: # yum -C list yum Loading "presto" plugin Loading "fastestmirror" plugin Loading "security" plugin Loading "changelog" plugin Loading "downloadonly" plugin Setting up and reading Presto delta metadata No Presto metadata available for fedora No Presto metadata available for livna Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-8&arch=x86_64 error was [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')> Error: Cannot find a valid baseurl for repo: fedora Disabling all plugins or just fastestmirror works: # yum -C --noplugins list yum Installed Packages yum.noarch 3.2.8-2.fc8 installed Moving "if opts.cacheonly" check before "if loadcache" fixes this. Ah, thanks. Fixed in 1e5a8cb86f744b6d38156247f16569675c0d6473 http://lmacken.fedorapeople.org/fastestmirror.py updated as well. yum-utils-1.1.14-1.fc9 has been submitted as an update for Fedora 9 yum-utils-1.1.14-1.fc8 has been submitted as an update for Fedora 8 yum-utils-1.1.14-1.fc9 has been pushed to the Fedora 9 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update yum-utils'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-4359 This has been fixed in yum-utils-1.1.14-4.fc9, which is now in the updates repository. |