RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Segfault while removing a package with current HEAD

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 26 Jan 2010 - 15:28:27 CET
Message-id: <9115E626-19AD-47E2-B928-52F00F331334@mac.com>

On Jan 26, 2010, at 9:02 AM, Jeff Johnson wrote:
> 
> Perfect. Thanks! I'll have a patch soonishly ...
> 

This should do the trick.

Packages with no files do not need to avoid contained
files when doing erasure ordering:

Index: depends.c
===================================================================
RCS file: /v/rpm/cvs/rpm/lib/depends.c,v
retrieving revision 1.454
diff -p -u -w -r1.454 depends.c
--- depends.c	17 Dec 2009 04:00:13 -0000	1.454
+++ depends.c	26 Jan 2010 14:26:08 -0000
@@ -2146,7 +2146,7 @@ static inline int addRelation(rpmts ts,
     if (*N == '/') {
 	rpmfi fi = rpmteFI(p, RPMTAG_BASENAMES);
 	rpmbf bf = rpmfiBloomFN(fi);
-	if (rpmbfChk(bf, N, strlen(N)))
+	if (bf != NULL && rpmbfChk(bf, N, strlen(N)))
 	    return 0;
     }
 
hth

73 de Jeff
Received on Tue Jan 26 15:28:53 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.