From 895cd79a1589d8517cc2cd145af3c9ff6a5414b0 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 9 Jul 2009 14:40:17 +0300 Subject: [PATCH] Create the directory used for transaction lock if necessary - otherwise at least rpm --initdb can fail due to transaction locking failing (cherry picked from commit 17f9073278206a979829fa41ac496476dde1a3ef) --- lib/rpmlock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rpmlock.c b/lib/rpmlock.c index 624ec99..d550407 100644 --- a/lib/rpmlock.c +++ b/lib/rpmlock.c @@ -37,6 +37,7 @@ static rpmlock rpmlock_new(const char *rootdir) if (t == NULL || *t == '\0' || *t == '%') t = xstrdup(RPMLOCK_PATH); rpmlock_path = xstrdup(t); + (void) rpmioMkpath(dirname(t), 0755, getuid(), getgid()); t = _free(t); } if (lock != NULL) { -- 2.7.4