From ac7c3412278a03da6633758bca999827d4b59038 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Sun, 8 Mar 2009 11:33:22 +0200 Subject: [PATCH] Load macros before creating directories (rhbz#489104) - %_sourcedir and friends can have things like %{name}, load macros before trying to create any directories when installing src.rpms --- lib/psm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/psm.c b/lib/psm.c index 3b2fd7c..112d344 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -275,6 +275,9 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, if (rootdir && strcmp(rootdir, "/") == 0) rootdir = NULL; + /* Macros need to be added before trying to create directories */ + rpmInstallLoadMacros(h); + if (specix >= 0) { const char *bn; @@ -301,8 +304,6 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, goto exit; } - rpmInstallLoadMacros(h); - te = rpmtsElement(ts, 0); if (te == NULL) { /* XXX can't happen */ goto exit; -- 2.7.4