[Yum-devel] [PATCH] Fail reverts of repomd.xml when we aren't doing timestamp checks. BZ 665919.

seth vidal skvidal at fedoraproject.org
Tue May 31 20:32:03 UTC 2011


On Tue, 2011-05-31 at 16:02 -0400, James Antill wrote:
> ---
>  yum/yumRepo.py |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/yum/yumRepo.py b/yum/yumRepo.py
> index 6ba058c..cfc6581 100644
> --- a/yum/yumRepo.py
> +++ b/yum/yumRepo.py
> @@ -1067,6 +1067,14 @@ class YumRepository(Repository, config.RepoConf):
>  
>      def _revertOldRepoXML(self):
>          """ If we have older data available, revert to it. """
> +
> +        #  If we can't do a timestamp check, then we can be looking at a
> +        # completely different repo. from last time ... ergo. we can't revert.
> +        #  We still want the old data, so we don't download twice. So we
> +        # pretend everything is good until the revert.
> +        if self.timestamp_check:
> +            raise Errors.RepoError, "Can't download or revert repomd.xml"
> +
>          if 'old_repo_XML' not in self._oldRepoMDData:
>              self._oldRepoMDData = {}
>              return

ACK - works for me
-sv




More information about the Yum-devel mailing list