From 66621c977c90c2daaebc88b38e303e32c2940b73 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Jun 28 2007 12:02:23 +0000 Subject: - don't hang because of leftover query iterators (#246044) --- diff --git a/rpm-4.4.2.1-rc1-query-iterators.patch b/rpm-4.4.2.1-rc1-query-iterators.patch new file mode 100644 index 0000000..4aa1620 --- /dev/null +++ b/rpm-4.4.2.1-rc1-query-iterators.patch @@ -0,0 +1,25 @@ +changeset: 6070:7ca081cd83d8 +tag: tip +user: Panu Matilainen +date: Thu Jun 28 14:44:48 2007 +0300 +summary: Remember to free up match iterators (rhbz#246044) + +diff -r a468a8443652 -r 7ca081cd83d8 lib/query.c +--- a/lib/query.c Wed Jun 27 16:29:16 2007 +0300 ++++ b/lib/query.c Thu Jun 28 14:44:48 2007 +0300 +@@ -680,10 +680,12 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, + case RPMQV_PACKAGE: + { + int matches = 0; +- qva->qva_mi = rpmtsInitIterator(ts, RPMDBI_LABEL, arg, 0); +- while (rpmdbNextIterator(qva->qva_mi) != NULL) { ++ rpmdbMatchIterator mi; ++ mi = rpmtsInitIterator(ts, RPMDBI_LABEL, arg, 0); ++ while (rpmdbNextIterator(mi) != NULL) { + matches++; + } ++ rpmdbFreeIterator(mi); + if (! matches) { + rpmError(RPMERR_QUERYINFO, _("package %s is not installed\n"), arg); + res = 1; + diff --git a/rpm.spec b/rpm.spec index b7a9d0c..bd48497 100644 --- a/rpm.spec +++ b/rpm.spec @@ -14,7 +14,7 @@ Summary: The RPM package management system Name: rpm Version: 4.4.2.1 %{expand: %%define rpm_version %{version}-rc1} -Release: 0.2.rc1 +Release: 0.3.rc1 Group: System Environment/Base Url: http://www.rpm.org/ Source: rpm-%{rpm_version}.tar.gz @@ -25,6 +25,7 @@ Patch4: rpm-4.4.2-devel-autodep.patch Patch5: rpm-4.4.2-rpmfc-skip.patch Patch6: rpm-4.4.2-matchpathcon.patch Patch7: rpm-4.4.2.1-rc1-poptver.patch +Patch8: rpm-4.4.2.1-rc1-query-iterators.patch License: GPL Requires(pre): shadow-utils Requires(postun): shadow-utils @@ -135,6 +136,7 @@ shell-like rules. %patch5 -p1 -b .fcskip %patch6 -p1 -b .matchpathcon %patch7 -p1 -b .poptver +%patch8 -p1 -b .queryiter %build @@ -429,6 +431,9 @@ exit 0 %{__includedir}/popt.h %changelog +* Thu Jun 28 2007 Panu Matilainen 4.4.2.1-0.3.rc1 +- don't hang because of leftover query iterators (#246044) + * Tue Jun 26 2007 Panu Matilainen 4.4.2.1-0.2.rc1 - patch popt version to 1.10.2.1 for clean upgrade path - popt release follows main package release again