diff --git a/reget-metadata-size-fix.patch b/reget-metadata-size-fix.patch new file mode 100644 index 0000000..2430310 --- /dev/null +++ b/reget-metadata-size-fix.patch @@ -0,0 +1,28 @@ +commit 2a9161a8b4bfc121fa8245700df355c63b58b442 +Author: James Antill +Date: Wed Mar 31 00:12:09 2010 -0400 + + Should work around the reget MD problems + +diff --git a/yum/yumRepo.py b/yum/yumRepo.py +index 8d7617e..b67b897 100644 +--- a/yum/yumRepo.py ++++ b/yum/yumRepo.py +@@ -1552,9 +1552,17 @@ class YumRepository(Repository, config.RepoConf): + try: + checkfunc = (self.checkMD, (mdtype,), {}) + text = "%s/%s" % (self.id, mdtype) ++ if thisdata.size is None: ++ reget = None ++ else: ++ reget = 'simple' ++ if os.path.exists(local): ++ if os.stat(local).st_size >= int(thisdata.size): ++ misc.unlink_f(local) + local = self._getFile(relative=remote, + local=local, + copy_local=1, ++ reget=reget, + checkfunc=checkfunc, + text=text, + cache=self.http_caching == 'all', diff --git a/yum.spec b/yum.spec index a8c4a16..91e64d8 100644 --- a/yum.spec +++ b/yum.spec @@ -3,7 +3,7 @@ Summary: RPM installer/updater Name: yum Version: 3.2.27 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz @@ -17,6 +17,7 @@ Patch4: no-more-exactarchlist.patch Patch5: geode-arch.patch Patch6: yum-HEAD.patch Patch7: yum-do-not-overwrite-keys.patch +Patch8: reget-metadata-size-fix.patch URL: http://yum.baseurl.org/ BuildArch: noarch @@ -62,6 +63,7 @@ can notify you when they are available via email, syslog or dbus. %patch5 -p1 #%%%patch6 -p1 %patch7 -p1 +%patch8 -p1 %build make @@ -112,6 +114,9 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/lib/yum-plugins %changelog +* Thu Apr 8 2010 Seth Vidal - 3.2.27-3 +- fix regets on metadata when we run into an old file that's larger + than the new one * Tue Mar 23 2010 Seth Vidal - 3.2.27-2 - broke searching in PK, this patch fixes it.