[yum/f18] fix bugs in package download and verify
Zdeněk Pavlas
zpavlas at fedoraproject.org
Mon Mar 25 14:21:12 UTC 2013
commit 605e50730032b876e64eae50eba4c712cdbc1e08
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Mon Mar 25 15:19:03 2013 +0100
fix bugs in package download and verify
BZ-927240-fix-package-download-and-verify.patch | 44 +++++++++++++++++++++++
yum.spec | 8 ++++-
2 files changed, 51 insertions(+), 1 deletions(-)
---
diff --git a/BZ-927240-fix-package-download-and-verify.patch b/BZ-927240-fix-package-download-and-verify.patch
new file mode 100644
index 0000000..a737ff0
--- /dev/null
+++ b/BZ-927240-fix-package-download-and-verify.patch
@@ -0,0 +1,44 @@
+commit fe21657d863708d48fe2ec4e056c37a1b676661c
+Author: Zdeněk Pavlas <zpavlas at redhat.com>
+Date: Wed Nov 14 09:51:26 2012 +0100
+
+ can't verify package before it's downloaded
+
+diff --git a/yum/yumRepo.py b/yum/yumRepo.py
+index 6bf520f..4f5f7a6 100644
+--- a/yum/yumRepo.py
++++ b/yum/yumRepo.py
+@@ -993,7 +993,8 @@ Insufficient space in download directory %s
+ **kwargs
+ )
+
+- if not package.verifyLocalPkg(): # Don't return as "success" when bad.
++ if not kwargs.get('async') and not package.verifyLocalPkg():
++ # Don't return as "success" when bad.
+ msg = "Downloaded package %s, from %s, but it was invalid."
+ msg = msg % (package, package.repo.id)
+ raise Errors.RepoError, msg
+
+downloadPkgs: skip duplicated packages
+
+diff -up yum-3.4.3/yum/__init__.py.old yum-3.4.3/yum/__init__.py
+--- yum-3.4.3/yum/__init__.py.old 2013-03-25 14:45:17.125277817 +0100
++++ yum-3.4.3/yum/__init__.py 2013-03-25 14:48:31.158718960 +0100
+@@ -2226,11 +2226,17 @@ much more problems).
+ repo_cached = False
+ remote_pkgs = []
+ remote_size = 0
++ beenthere = set() # only once, please. BZ 468401
+ for po in pkglist:
+ if hasattr(po, 'pkgtype') and po.pkgtype == 'local':
+ continue
+
+ local = po.localPkg()
++ if local in beenthere:
++ # This is definitely a depsolver bug. Make it fatal?
++ self.verbose_logger.warn(_("ignoring a dupe of %s") % po)
++ continue
++ beenthere.add(local)
+ if os.path.exists(local):
+ if not self.verifyPkg(local, po, False):
+ if po.repo.cache:
diff --git a/yum.spec b/yum.spec
index f38aa45..53f8e96 100644
--- a/yum.spec
+++ b/yum.spec
@@ -18,7 +18,7 @@
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.4.3
-Release: 52%{?dist}
+Release: 53%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -36,6 +36,7 @@ Patch22: BZ-881756-include-langpacks.patch
Patch23: BZ-885139-not-enough-arguments.patch
Patch24: BZ-908870-MD-files-bad.patch
Patch25: BZ-870691-repos-with-no-url.patch
+Patch26: BZ-927240-fix-package-download-and-verify.patch
URL: http://yum.baseurl.org/
BuildArchitectures: noarch
@@ -154,6 +155,7 @@ Install this package if you want auto yum updates nightly via cron.
%patch23 -p1
%patch24 -p1
%patch25 -p1
+%patch26 -p1
%patch1 -p1
%build
@@ -329,6 +331,10 @@ exit 0
%endif
%changelog
+* Mon Mar 25 2013 Zdenek Pavlas <zpavlas at redhat.com> - 3.4.3-53
+- fix getPackage() calling verifyLocalPkg() too early
+- downloadPkgs(): skip duplicated packages, issue warning.
+
* Mon Mar 11 2013 Zdenek Pavlas <zpavlas at redhat.com> - 3.4.3-52
- ui_id: prevent TB on invalid repos with no URLs. BZ 870691
More information about the scm-commits
mailing list