diff options
author | Jindrich Novy <jnovy@redhat.com> | 2008-09-01 14:31:33 +0200 |
---|---|---|
committer | Jindrich Novy <jnovy@redhat.com> | 2008-09-01 14:31:33 +0200 |
commit | b16df5b3089e36cf0bd697177983dcae11b849ec (patch) | |
tree | 9bcd8a43568ab73bc7dec1a49d9f04e0b37cce03 /lib/psm.c | |
parent | 436aab02e7f9870835d7c992734fcb2922e273c3 (diff) | |
download | rpm-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/psm.c')
-rw-r--r-- | lib/psm.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) { |