diff options
Diffstat (limited to 'build/parsePrep.c')
-rw-r--r-- | build/parsePrep.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/build/parsePrep.c b/build/parsePrep.c index 5e12a72c4..9830f6bce 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -276,9 +276,14 @@ static int doSetupMacro(Spec spec, char *line) poptFreeContext(optCon); /* cd to the build dir */ - strcpy(buf, "cd %{_builddir}"); - expandMacros(spec, spec->macros, buf, sizeof(buf)); - appendLineStringBuf(spec->prep, buf); + { const char * buildURL = rpmGenPath(spec->rootdir, "%{_builddir}", ""); + const char *buildDir; + + (void) urlPath(buildURL, &buildDir); + sprintf(buf, "cd %s", buildDir); + appendLineStringBuf(spec->prep, buf); + xfree(buildURL); + } /* delete any old sources */ if (!leaveDirs) { |