[CentOS-devel] [PATCH] Some packages seem to want to know where 'topdir' is....

Mon Dec 1 16:16:19 UTC 2014
Pat Riehecky <riehecky at fnal.gov>

From: Pat Riehecky <riehecky at fnal.gov>

---
 return_disttag.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/return_disttag.sh b/return_disttag.sh
index 2c1e522..0048cd6 100755
--- a/return_disttag.sh
+++ b/return_disttag.sh
@@ -25,12 +25,12 @@ build_with_dist_scl() {
     SCL=${3:-}
 
     if [[ "x${SCL}" == 'x' ]]; then
-        result=$(rpm --define "dist ${DIST}" -q --specfile "${SPECFILE}" --qf '%{n}-%{v}-%{r}\n' 2>/dev/null | head -n 1)
+        result=$(rpm --define "%_topdir `pwd`" --define "dist ${DIST}" -q --specfile "${SPECFILE}" --qf '%{n}-%{v}-%{r}\n' 2>/dev/null | head -n 1)
     else
-        result=$(rpm --define "dist ${DIST}" --define "scl ${SCL}" -q --specfile "${SPECFILE}" --qf '%{n}-%{v}-%{r}\n' 2>/dev/null | head -n 1)
+        result=$(rpm --define "%_topdir `pwd`" --define "dist ${DIST}" --define "scl ${SCL}" -q --specfile "${SPECFILE}" --qf '%{n}-%{v}-%{r}\n' 2>/dev/null | head -n 1)
     fi
 
-    echo $result
+    echo ${result}
 }
 
 #####################################################################
-- 
1.7.1