Bug 665920 - repodiff uses stale metadata cache in subsequent runs, if the repodata fails (it reverts)
repodiff uses stale metadata cache in subsequent runs, if the repodata fails ...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
14
All All
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-27 18:17 EST by Marcelo Moreira de Mello
Modified: 2014-01-21 18:17 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-16 12:52:45 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)
Test connection on arguments passed (1.84 KB, patch)
2010-12-27 18:20 EST, Marcelo Moreira de Mello
no flags Details | Diff
--nocache option (1.46 KB, patch)
2010-12-28 13:27 EST, Marcelo Moreira de Mello
no flags Details | Diff

  None (edit)
Description Marcelo Moreira de Mello 2010-12-27 18:17:10 EST
Description of problem:

When running two repodiff commands in succession, the second run will reuse cached data from the first. 
Version-Release number of selected component (if applicable):


How reproducible:
100%
Fedora 14

Steps to Reproduce:
1. repodiff -old=http://mirror.optus.net/fedora/linux/releases/13/Fedora/source/SRPMS/ --new=http://mirror.optus.net/fedora/linux/releases/13/Fedora/source/SRPMS/ --new=http://mirror.optus.net/fedora/linux/updates/13/SRPMS/ > /tmp/first.out

2. repodiff --old=http://doesnotexist.example.com/ --new=http://doesnotexist.example.com --new=http://reallydoesnotexist.example.com  > /tmp/noexist.out

3. diff /tmp/first.out /tmp/noexist.out

4. rm -rf /var/tmp/yum-*

5. repodiff --old=http://doesnotexist.example.com/ --new=http://doesnotexist.example.com --new=http://reallydoesnotexist.example.com  > /tmp/noexist.out
  
Actual results:

Even using a not valid host on the second run, repodiff reuse the cached data. 


Expected results:
repodiff validate when not connect or before reuse the cached data.
Comment 2 Marcelo Moreira de Mello 2010-12-27 18:20:02 EST
Created attachment 470892 [details]
Test connection on arguments passed

Patch Proposed for connection test.
Comment 3 Marcelo Moreira de Mello 2010-12-28 13:27:52 EST
Created attachment 470989 [details]
--nocache option

Hello, 

I wrote a small patch to refresh metadata cache. 

Patch Proposed: --nocache option to refresh metadata cache. 


$>git clone git://yum.baseurl.org/yum-utils.git
Cloning into yum-utils...
remote: Counting objects: 4847, done.
remote: Compressing objects: 100% (2857/2857), done.
remote: Total 4847 (delta 3177), reused 3003 (delta 1978)
Receiving objects: 100% (4847/4847), 787.44 KiB | 281 KiB/s, done.
Resolving deltas: 100% (3177/3177), done.
$> cd yum-utils/
$> patch -p0 < ../repodiff-upstream-connection-test.patch 
patching file repodiff.py
$> patch -p0 < ../repodiff-upstream-nocache-option.patch 
patching file repodiff.py
Hunk #2 succeeded at 38 (offset 2 lines).
Hunk #3 succeeded at 187 (offset 27 lines).
Hunk #4 succeeded at 217 (offset 27 lines).

$> ./repodiff.py --old=http://mirror.optus.net/fedora/linux/releases/13/Fedora/source/SRPMS/ --new=http://mirror.optus.net/fedora/linux/releases/13/Fedora/source/SRPMS/ --new=http://mirror.optus.net/fedora/linux/updates/13/SRPMS/ > /tmp/f13.diff
*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
$> ./repodiff.py --old=http://doesnotexist.example.com/ --new=http://doesnotexist.example.com --new=http://reallydoesnotexist.example.com 
Loaded plugins: fastestmirror, langpacks, presto, rhnplugin
Adding en_US to language list
*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
setting up repos
setting up old repo http://doesnotexist.example.com/
Connection Error: doesnotexist.example.com not reachable

$> ./repodiff.py --help
Usage: 
    repodiff: take 2 or more repositories and return a list of added, removed and changed
              packages.
              
    repodiff --old=old_repo_baseurl --new=new_repo_baseurl 

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -n NEW, --new=NEW     new baseurl[s] for repos
  -o OLD, --old=OLD     old baseurl[s] for repos
  -q, --quiet           
  -a ARCHLIST, --archlist=ARCHLIST
                        In addition to src.rpms, any arch you want to include
  -s, --size            Output size changes for any new->old packages
  --simple              output simple format
  --nocache             Remove metadata cache dir
Comment 4 Fedora End Of Life 2012-08-16 12:52:48 EDT
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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