rpm-5.4.10-22.i686 loops forever when installing ntpd-4.2.6p5-5.i686.rpm
Jan Rękorajski
baggins at pld-linux.org
Fri Nov 30 21:47:13 CET 2012
On Fri, 30 Nov 2012, Jeffrey Johnson wrote:
>
> On Nov 30, 2012, at 2:53 PM, Jan Rękorajski wrote:
>
> > On Fri, 30 Nov 2012, Jeffrey Johnson wrote:
> >
> > The real problem that I was afraid to touch to avoid messing things up
> > is lib/rpmal.c:rpmalAllSatisfiesDepend() which seems to work on global
> > lists instead of private copies which caused the infinite loop because
> > it decremented interator in rpmds 'provides' list for a transaction.
> >
>
> If this is the real problem, then the fix for infinite looping
> has little to do with namespaces at all.
>
> 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.
Thanks for clarification, I was thinking I must be seeing things ;)
> Either the low level search has to save/restore loop indexes,
> or the high level loop needs its own copy.
The real fix for the loop bug below.
BTW, did you look into the problem with triggers arguments?
--- 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);
--
Jan Rękorajski | PLD/Linux
SysAdm | http://www.pld-linux.org/
baggins<at>mimuw.edu.pl
baggins<at>pld-linux.org
More information about the pld-devel-en
mailing list