66621c - don't hang because of leftover query iterators (#246044)

Authored and Committed by Panu Matilainen 17 years ago
    - don't hang because of leftover query iterators (#246044)
    
        
rpm-4.4.2.1-rc1-query-iterators.patch ADDED
@@ -0,0 +1,25 @@
1
+ changeset: 6070:7ca081cd83d8
2
+ tag: tip
3
+ user: Panu Matilainen <pmatilai@redhat.com>
4
+ date: Thu Jun 28 14:44:48 2007 +0300
5
+ summary: Remember to free up match iterators (rhbz#246044)
6
+
7
+ diff -r a468a8443652 -r 7ca081cd83d8 lib/query.c
8
+ --- a/lib/query.c Wed Jun 27 16:29:16 2007 +0300
9
+ +++ b/lib/query.c Thu Jun 28 14:44:48 2007 +0300
10
+ @@ -680,10 +680,12 @@ int rpmQueryVerify(QVA_t qva, rpmts ts,
11
+ case RPMQV_PACKAGE:
12
+ {
13
+ int matches = 0;
14
+ - qva->qva_mi = rpmtsInitIterator(ts, RPMDBI_LABEL, arg, 0);
15
+ - while (rpmdbNextIterator(qva->qva_mi) != NULL) {
16
+ + rpmdbMatchIterator mi;
17
+ + mi = rpmtsInitIterator(ts, RPMDBI_LABEL, arg, 0);
18
+ + while (rpmdbNextIterator(mi) != NULL) {
19
+ matches++;
20
+ }
21
+ + rpmdbFreeIterator(mi);
22
+ if (! matches) {
23
+ rpmError(RPMERR_QUERYINFO, _("package %s is not installed\n"), arg);
24
+ res = 1;
25
+
file modified
+6 -1
rpm.spec CHANGED
@@ -14,7 +14,7 @@ Summary: The RPM package management system
14
14
Name: rpm
15
15
Version: 4.4.2.1
16
16
%{expand: %%define rpm_version %{version}-rc1}
17
- Release: 0.2.rc1
17
+ Release: 0.3.rc1
18
18
Group: System Environment/Base
19
19
Url: http://www.rpm.org/
20
20
Source: rpm-%{rpm_version}.tar.gz
@@ -25,6 +25,7 @@ Patch4: rpm-4.4.2-devel-autodep.patch
25
25
Patch5: rpm-4.4.2-rpmfc-skip.patch
26
26
Patch6: rpm-4.4.2-matchpathcon.patch
27
27
Patch7: rpm-4.4.2.1-rc1-poptver.patch
28
+ Patch8: rpm-4.4.2.1-rc1-query-iterators.patch
28
29
License: GPL
29
30
Requires(pre): shadow-utils
30
31
Requires(postun): shadow-utils
@@ -135,6 +136,7 @@ shell-like rules.
135
136
%patch5 -p1 -b .fcskip
136
137
%patch6 -p1 -b .matchpathcon
137
138
%patch7 -p1 -b .poptver
139
+ %patch8 -p1 -b .queryiter
138
140
139
141
%build
140
142
@@ -429,6 +431,9 @@ exit 0
429
431
%{__includedir}/popt.h
430
432
431
433
%changelog
434
+ * Thu Jun 28 2007 Panu Matilainen <pmatilai@redhat.com> 4.4.2.1-0.3.rc1
435
+ - don't hang because of leftover query iterators (#246044)
436
+
432
437
* Tue Jun 26 2007 Panu Matilainen <pmatilai@redhat.com> 4.4.2.1-0.2.rc1
433
438
- patch popt version to 1.10.2.1 for clean upgrade path
434
439
- popt release follows main package release again