rpm/rpm-4.4.2-userlock.patch

21 lines
669 B
Diff
Raw Normal View History

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