Bug 665920 - repodiff uses stale metadata cache in subsequent runs, if the repodata fails (it reverts)
Summary: repodiff uses stale metadata cache in subsequent runs, if the repodata fails ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: 14
Hardware: All
OS: All
medium
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-27 23:17 UTC by Marcelo Moreira de Mello
Modified: 2014-01-21 23:17 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-16 16:52:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Test connection on arguments passed (1.84 KB, patch)
2010-12-27 23:20 UTC, Marcelo Moreira de Mello
no flags Details | Diff
--nocache option (1.46 KB, patch)
2010-12-28 18:27 UTC, Marcelo Moreira de Mello
no flags Details | Diff

Description Marcelo Moreira de Mello 2010-12-27 23:17:10 UTC
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 23:20:02 UTC
Created attachment 470892 [details]
Test connection on arguments passed

Patch Proposed for connection test.

Comment 3 Marcelo Moreira de Mello 2010-12-28 18:27:52 UTC
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 16:52:48 UTC
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.