2009/11/17 Jeff Johnson <n3...@mac.com> > > On Nov 17, 2009, at 12:49 PM, Per Øyvind Karlsen wrote: > > > > 2009/11/17 Jeff Johnson <n3...@mac.com> > >> >> On Nov 17, 2009, at 12:40 PM, Per Øyvind Karlsen wrote: >> >> > I just did a fresh install of Mandriva Linux and updated to rpm 5.2 now, >> > and this happens: >> > >> >> Yup. Attached patch avoids the segfault: >> >> Index: rpmdb/header_internal.c >> =================================================================== >> RCS file: /v/rpm/cvs/rpm/rpmdb/header_internal.c,v >> retrieving revision 1.19 >> diff -p -u -w -r1.19 header_internal.c >> --- rpmdb/header_internal.c 31 Jul 2008 02:40:08 -0000 1.19 >> +++ rpmdb/header_internal.c 17 Nov 2009 17:43:21 -0000 >> @@ -47,7 +47,9 @@ int headerVerifyInfo(rpmuint32_t il, rpm >> /* XXX Convert RPMTAG_FILESTATE to RPM_UINT8_TYPE. */ >> if (info->tag == 1029 && info->type == 1) { >> info->type = RPM_UINT8_TYPE; >> +#ifdef DYING >> pe[i].type = (rpmuint32_t) htonl(info->type); >> +#endif >> } >> info->offset = (rpmint32_t) ntohl(pe[i].offset); >> assert(negate || info->offset >= 0); /* XXX insurance */ >> >> headerCheck is rather useless now that header blob's are PROT_READ >> protected. >> >> 73 de Jeff > > d'oh: > ==> dbiOpen(0xb604a30, Pubkeys(266), > 0x0) > D: opening db index /var/lib/rpm/Pubkeys rdonly > mode=0x0 > --> db 0xb604a30 ++ 2 matchIterator at > rpmdb.c:2913 > ==> dbiOpen(0xb604a30, Packages(0), > 0x0) > D: pool h: created size 344 limit -1 flags > 0 > ==> dbiOpen(0xb604a30, Packages(0), > 0x0) > --> db 0xb604a30 -- 2 rpmdbClose at > rpmdb.c:1034 > D: pool iob: created size 40 limit -1 flags > 0 > D: ========== DSA pubkey id dd684d7a 26752624 > (h#1) > D: rpmdb: read h# 769 Header V3 DSA signature: OK, key ID > 26752624 > error: rpmdb: damaged header #769 retrieved -- > skipping. > D: rpmdb: read h# 1538 Header V3 DSA signature: OK, key ID 26752624 > error: rpmdb: damaged header #1538 retrieved -- skipping. > > > Disable all the header check's. > > The root issue (my guess) is likely RPM_CHAR_TYPE == 1 > or not. RPM_CHAR_TYPE was removed in rpm-5.0, but > is still present in @rpm.org code. > > RPM_CHAR_TYPE is used solely for keeping track of > file state after install. Its a bit mask of 8 bits, the typing > Simply Does Not Matter (but headerCheck() will fail headers) > > Also see the patch I sent back in June knocking out as > many incompatibilities with rpm-4.7.x as possible. > > 73 de Jeff > Well, I've tried disabling both headerVerifyInfo() & headerCheck(), idn't really do much about the segfault it seems.. :/
Not sure what exactly I should be looking for in the patches.. -- Regards, Per Øyvind