summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJindrich Novy <jnovy@redhat.com>2008-09-01 14:31:33 +0200
committerJindrich Novy <jnovy@redhat.com>2008-09-01 14:31:33 +0200
commitb16df5b3089e36cf0bd697177983dcae11b849ec (patch)
tree9bcd8a43568ab73bc7dec1a49d9f04e0b37cce03 /lib
parent436aab02e7f9870835d7c992734fcb2922e273c3 (diff)
downloadrpm-b16df5b3089e36cf0bd697177983dcae11b849ec.tar.gz
rpm-b16df5b3089e36cf0bd697177983dcae11b849ec.tar.bz2
rpm-b16df5b3089e36cf0bd697177983dcae11b849ec.zip
Create _topdir if it doesn't exist when installing SRPM
- otherwise creating _sourcedir and _specdir fails
Diffstat (limited to 'lib')
-rw-r--r--lib/psm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/psm.c b/lib/psm.c
index d4bea692f..046964b47 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -231,6 +231,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
{
int scareMem = 1;
rpmfi fi = NULL;
+ char * _topdir = NULL;
char * _sourcedir = NULL;
char * _specdir = NULL;
char * specFile = NULL;
@@ -335,6 +336,13 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
}
}
+ _topdir = rpmGenPath(rpmtsRootDir(ts), "%{_topdir}", "");
+ rpmrc = rpmMkdirPath(_topdir, "_topdir");
+ if (rpmrc) {
+ rpmrc = RPMRC_FAIL;
+ goto exit;
+ }
+
_sourcedir = rpmGenPath(rpmtsRootDir(ts), "%{_sourcedir}", "");
rpmrc = rpmMkdirPath(_sourcedir, "_sourcedir");
if (rpmrc) {