SOURCES: rpm-empty-rpmlock-path.patch (NEW) - don't attempt to cre...

qboosh qboosh at pld-linux.org
Fri Dec 16 01:00:16 CET 2005


Author: qboosh                       Date: Fri Dec 16 00:00:16 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- don't attempt to create lock with a pathname of existing directory if _rpmlock_path is not defined

---- Files affected:
SOURCES:
   rpm-empty-rpmlock-path.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/rpm-empty-rpmlock-path.patch
diff -u /dev/null SOURCES/rpm-empty-rpmlock-path.patch:1.1
--- /dev/null	Fri Dec 16 01:00:16 2005
+++ SOURCES/rpm-empty-rpmlock-path.patch	Fri Dec 16 01:00:10 2005
@@ -0,0 +1,15 @@
+--- rpm-4.4.4/lib/rpmlock.c.orig	2005-12-08 19:32:31.000000000 +0100
++++ rpm-4.4.4/lib/rpmlock.c	2005-12-16 01:00:31.601268584 +0100
+@@ -39,7 +39,11 @@
+     /* XXX oneshot to determine path for fcntl lock. */
+     /* XXX rpmlock_path is set once, cannot be changed with %{_rpmlock_path}. */
+     if (!oneshot) {
+-	char * t = rpmGenPath(rootdir, rpmlock_path_default, NULL);
++	char * t = NULL;
++	char * check = rpmExpand(rpmlock_path_default, NULL);
++	if (check[0] != '\0')
++	    t = rpmGenPath(rootdir, rpmlock_path_default, NULL);
++	free(check);
+ 	if (t == NULL || *t == '\0' || *t == '%')
+ 	    t = _free(t);
+ 	rpmlock_path = t;
================================================================



More information about the pld-cvs-commit mailing list