[yum/f16] Fix traceback when querying available package's strong requires.
Zdeněk Pavlas
zpavlas at fedoraproject.org
Wed Aug 1 15:39:06 UTC 2012
commit c9f974a35e91787ddcbe46c8cc81ec092eaaac4f
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date: Wed Aug 1 17:38:32 2012 +0200
Fix traceback when querying available package's strong requires.
handle-strong-requires-of-avail-po.patch | 27 +++++++++++++++++++++++++++
yum.spec | 7 ++++++-
2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/handle-strong-requires-of-avail-po.patch b/handle-strong-requires-of-avail-po.patch
new file mode 100644
index 0000000..2825eb7
--- /dev/null
+++ b/handle-strong-requires-of-avail-po.patch
@@ -0,0 +1,27 @@
+commit eb245abe8272da41f484680c5a88518798b15071
+Author: Zdeněk Pavlas <zpavlas at redhat.com>
+Date: Tue May 15 18:44:19 2012 +0200
+
+ Handle avail_po.returnPrco('strong_requires')
+
+ Don't traceback when querying available package's strong requires.
+ Return all requires instead. This is incorrect, but conservative
+ and should work as expected in most use cases.
+
+ https://fedorahosted.org/autoqa/ticket/421
+
+diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
+index f6df93e..ba929de 100644
+--- a/yum/sqlitesack.py
++++ b/yum/sqlitesack.py
+@@ -382,6 +382,10 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
+
+ def returnPrco(self, prcotype, printable=False):
+ prcotype = _share_data(prcotype)
++ if prcotype == 'strong_requires':
++ # pkg not installed so we don't know require flags yet
++ # returning all requires should work in most cases
++ prcotype = 'requires'
+ if isinstance(self.prco[prcotype], tuple):
+ sql = "SELECT name, version, release, epoch, flags " \
+ "FROM %s WHERE pkgKey = ?" % prcotype
diff --git a/yum.spec b/yum.spec
index 95665ed..e3fa379 100644
--- a/yum.spec
+++ b/yum.spec
@@ -18,7 +18,7 @@
Summary: RPM package installer/updater/manager
Name: yum
Version: 3.4.3
-Release: 24%{?dist}
+Release: 25%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz
@@ -33,6 +33,7 @@ Patch8: BZ-803346-no-only-update.patch
Patch20: yum-manpage-files.patch
Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch
Patch22: BZ-809469-completion-helper.patch
+Patch23: handle-strong-requires-of-avail-po.patch
URL: http://yum.baseurl.org/
BuildArchitectures: noarch
@@ -142,6 +143,7 @@ Install this package if you want auto yum updates nightly via cron.
%patch8 -p1
%patch20 -p1
%patch22 -p1
+%patch23 -p1
%patch1 -p1
%build
@@ -316,6 +318,9 @@ exit 0
%endif
%changelog
+* Wed Aug 1 2012 Zdenek Pavlas <zpavlas at redhat.com> - 3.4.3-25
+- Don't traceback when querying available package's strong requires.
+
* Thu Apr 26 2012 Zdenek Pavlas <zpavlas at redhat.com> - 3.4.3-24
- backported completion-helper.py patches from HEAD, BZ 809469.
More information about the scm-commits
mailing list