[packages/rpm/db52] - fix the root cause behind infinite loop during ntpd install
baggins
baggins at pld-linux.org
Fri Nov 30 21:55:01 CET 2012
commit c4861085c7221808b4c69757cb5c79c7371b5231
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Fri Nov 30 21:51:07 2012 +0100
- fix the root cause behind infinite loop during ntpd install
On Fri, 30 Nov 2012, Jeffrey Johnson wrote:
[...]
> Yes: the iterator loop index on dependency sets is global.
>
> Which means that if something decrements the iterator index
> lower down, then the high level will continuously repeat.
And this exactly happened in lib/rpmal.c:rpmalAllSatisfiesDepend()
for 'provides' set because ntpd provided 'ntp' twice in different
manespaces.
rpm-preserve-iterator.patch | 23 +++++++++++++++++++++++
rpm.spec | 4 +++-
2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index 08f2ebb..e5053e4 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -52,7 +52,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 5.4.10
-Release: 35.2
+Release: 35.3
License: LGPL
Group: Base
# http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
@@ -149,6 +149,7 @@ Patch54: %{name}-fix-filedigests-verify.patch
Patch55: %{name}-disable-hmac-verify.patch
Patch56: rpm-macros.patch
Patch57: %{name}-db5.2.patch
+Patch58: %{name}-preserve-iterator.patch
# Patches imported from Mandriva
@@ -846,6 +847,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
%patch55 -p1
%patch56 -p1
%patch57 -p1
+%patch58 -p1
%patch1000 -p1
%patch1001 -p1
diff --git a/rpm-preserve-iterator.patch b/rpm-preserve-iterator.patch
new file mode 100644
index 0000000..3764ec5
--- /dev/null
+++ b/rpm-preserve-iterator.patch
@@ -0,0 +1,23 @@
+--- rpm-5.4.10/lib/rpmal.c~ 2012-11-30 13:20:59.087249280 +0100
++++ rpm-5.4.10/lib/rpmal.c 2012-11-30 21:20:20.856611761 +0100
+@@ -403,6 +403,7 @@
+ const char * KName;
+ availablePackage alp;
+ int rc;
++ int savedIx;
+
+ if (keyp) *keyp = RPMAL_NOMATCH;
+
+@@ -450,10 +451,12 @@
+ if (alp->provides != NULL) /* XXX can't happen */
+ switch (match->type) {
+ case IET_PROVIDES:
++ savedIx = rpmdsIx(alp->provides);
+ /* XXX single step on rpmdsNext to regenerate DNEVR string */
+ (void) rpmdsSetIx(alp->provides, match->entryIx - 1);
+ if (rpmdsNext(alp->provides) >= 0)
+ rc = rpmdsCompare(alp->provides, ds);
++ (void) rpmdsSetIx(alp->provides, savedIx);
+
+ if (rc)
+ rpmdsNotify(ds, _("(added provide)"), 0);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/c4861085c7221808b4c69757cb5c79c7371b5231
More information about the pld-cvs-commit
mailing list