rpm/rpm-4.4.2-userlock.patch

24 lines
722 B
Diff
Raw Normal View History

--- rpm-4.4.2/lib/rpmlock.c.userlock 2005-01-26 13:41:43.000000000 +0000
+++ rpm-4.4.2/lib/rpmlock.c 2007-03-13 10:33:15.000000000 +0000
@@ -37,9 +37,9 @@
/* 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;
+ t = strdup(RPMLOCK_PATH);
rpmlock_path = xstrdup(t);
t = _free(t);
}
@@ -129,7 +129,7 @@
const char *rootDir = rpmtsRootDir(ts);
rpmlock lock;
- if (!rootDir)
+ if (!rootDir || rpmtsChrootDone(ts))
rootDir = "/";
lock = rpmlock_new(rootDir);
/*@-branchstate@*/