From bc9746b005ab001c3e2ac22aee806aaf70c21724 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 21 Feb 1996 17:17:58 +0000 Subject: [PATCH] fix ROOT_DIR setting (for NULL) CVS patchset: 377 CVS date: 1996/02/21 17:17:58 --- build/build.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/build.c b/build/build.c index 77ad063..a8fe860 100644 --- a/build/build.c +++ b/build/build.c @@ -66,7 +66,11 @@ struct Script *openScript(Spec spec, int builddir, char *name) fprintf(script->file, "RPM_BUILD_DIR=\"%s\"\n", getVar(RPMVAR_BUILDDIR)); fprintf(script->file, "RPM_DOC_DIR=\"%s\"\n", getVar(RPMVAR_DOCDIR)); fprintf(script->file, "RPM_OPT_FLAGS=\"%s\"\n", getVar(RPMVAR_OPTFLAGS)); - fprintf(script->file, "RPM_ROOT_DIR=\"%s\"\n", getVar(RPMVAR_ROOT)); + if (getVar(RPMVAR_ROOT)) { + fprintf(script->file, "RPM_ROOT_DIR=\"%s\"\n", getVar(RPMVAR_ROOT)); + } else { + fprintf(script->file, "RPM_ROOT_DIR=\"\"\n"); + } fprintf(script->file, "RPM_PACKAGE_NAME=\"%s\"\n", spec->name); getEntry(main_package->header, RPMTAG_VERSION, &foo, (void **)&s, &foo); -- 2.7.4