From 374848a5a04be5574bac5d93870ecc3a6c27f6f4 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 11 Jul 2013 11:24:58 +0200 Subject: [PATCH] autoport: use rpm to eval specdir if autospec doesn't return it --- autodist | 2 +- autoport | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/autodist b/autodist index eb26e61..9453ff2 100755 --- a/autodist +++ b/autodist @@ -5,7 +5,7 @@ # # Released under the terms of the GNU GPL release 3 license # -VERSION=0.9.6 +VERSION=0.9.7 me=(${0##*/} $VERSION "Sat Aug 20 2010") exec 3>`readlink /proc/self/fd/0` diff --git a/autoport b/autoport index f39b0ce..da34a39 100755 --- a/autoport +++ b/autoport @@ -322,7 +322,12 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do BUILD_CPU=`echo $BUILD_PLATFORM | cut -d- -f1` TARGET_PLATFORM=`rpm --target $TARGET_ARCH --eval %{_target_platform}` TARGET_CPU=`echo $TARGET_PLATFORM | cut -d- -f1` - SPECDIR=`rpm --eval %{_specdir}` + eval `autospec --eval spec_dir | tail -n1` + if [ "$spec_dir" ]; then + SPECDIR=$spec_dir + else + SPECDIR=`rpm --eval %{_specdir}` + fi echo "Build platform is $BUILD_PLATFORM" echo "Target platform is $TARGET_PLATFORM" @@ -476,7 +481,6 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do [ "$VERBOSE_MODE" ] && echo " %% COMMAND: LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\"" LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" &>$tmpfile - cat $tmpfile >> $logfile [ $? -gt 0 ] && { echo "(FAILED) " autoport_log ${JOB_CURRENT} update failed $tmpfile