File norpmlockcache.diff of Package rpm

--- lib/rpmlock.c.orig	2011-06-30 10:25:53.000000000 +0000
+++ lib/rpmlock.c	2011-06-30 10:27:04.000000000 +0000
@@ -35,6 +35,9 @@ static rpmlock rpmlock_new(/*@unused@*/
 {
 	rpmlock lock = (rpmlock) malloc(sizeof(*lock));
 
+	/* XXX: can't cache result as it depends on rootdir */
+	if (rpmlock_path != NULL)
+	    rpmlock_path = _free(rpmlock_path);
 	/* XXX oneshot to determine path for fcntl lock. */
 	if (rpmlock_path == NULL) {
 	    char * t = rpmGenPath(rootdir, rpmlock_path_default, NULL);