teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.4.2-userlock.patch

Paul Nasrat 57dc36
--- rpm-4.4.2/lib/rpmlock.c.userlock	2006-02-23 15:24:46.000000000 -0500
Paul Nasrat 57dc36
+++ rpm-4.4.2/lib/rpmlock.c	2006-02-23 15:25:53.000000000 -0500
Paul Nasrat 57dc36
@@ -37,7 +37,7 @@
Paul Nasrat 57dc36
 
Paul Nasrat 57dc36
 	/* XXX oneshot to determine path for fcntl lock. */
Paul Nasrat 57dc36
 	if (rpmlock_path == NULL) {
Paul Nasrat 57dc36
-	    char * t = rpmExpand(rpmlock_path_default, NULL);
Paul Nasrat 57dc36
+	    char * t = rpmGenPath(rootdir, rpmlock_path_default, NULL);
Paul Nasrat 57dc36
 	    if (t == NULL || *t == '\0' || *t == '%')
Paul Nasrat 57dc36
 		t = RPMLOCK_PATH;
Paul Nasrat 57dc36
 	    rpmlock_path = xstrdup(t);
Paul Nasrat 57dc36
@@ -129,7 +129,7 @@
Paul Nasrat 57dc36
 	const char *rootDir = rpmtsRootDir(ts);
Paul Nasrat 57dc36
 	rpmlock lock;
Paul Nasrat 57dc36
 
Paul Nasrat 57dc36
-	if (!rootDir)
Paul Nasrat 57dc36
+	if (!rootDir || rpmtsChrootDone(ts))
Paul Nasrat 57dc36
 		rootDir = "/";
Paul Nasrat 57dc36
 	lock = rpmlock_new(rootDir);
Paul Nasrat 57dc36
 /*@-branchstate@*/