- rpmtsRootDir() gives "/" even if root not actually set which makes sense
for most operations but not when we're creating build directories
/* Create build tree if necessary */
const char * buildtree = "%{_topdir}:%{_specdir}:%{_sourcedir}:%{_builddir}:%{_rpmdir}:%{_srcrpmdir}:%{_buildrootdir}";
- if (rpmMkdirs(rpmtsRootDir(ts), buildtree)) {
+ const char * rootdir = rpmtsRootDir(ts);
+ if (rpmMkdirs(strcmp(rootdir, "/") ? rootdir : NULL , buildtree)) {
goto exit;
}
{
rpmfi fi = NULL;
char * specFile = NULL;
+ const char *rootdir = rpmtsRootDir(ts);
Header h = NULL;
rpmpsm psm = NULL;
rpmte te = NULL;
}
}
+ if (strcmp(rootdir, "/") == 0)
+ rootdir = NULL;
+
if (specix >= 0) {
const char *bn;