autoport: use rpm to eval specdir if autospec doesn't return it

This commit is contained in:
Silvan Calarco 2013-07-11 11:24:58 +02:00
parent c35c462647
commit 374848a5a0
2 changed files with 7 additions and 3 deletions

View File

@ -5,7 +5,7 @@
# #
# Released under the terms of the GNU GPL release 3 license # 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") me=(${0##*/} $VERSION "Sat Aug 20 2010")
exec 3>`readlink /proc/self/fd/0` exec 3>`readlink /proc/self/fd/0`

View File

@ -322,7 +322,12 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
BUILD_CPU=`echo $BUILD_PLATFORM | cut -d- -f1` BUILD_CPU=`echo $BUILD_PLATFORM | cut -d- -f1`
TARGET_PLATFORM=`rpm --target $TARGET_ARCH --eval %{_target_platform}` TARGET_PLATFORM=`rpm --target $TARGET_ARCH --eval %{_target_platform}`
TARGET_CPU=`echo $TARGET_PLATFORM | cut -d- -f1` 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 "Build platform is $BUILD_PLATFORM"
echo "Target platform is $TARGET_PLATFORM" echo "Target platform is $TARGET_PLATFORM"
@ -476,7 +481,6 @@ for TARGET_ARCH in ${TARGET_ARCHS}; do
[ "$VERBOSE_MODE" ] && echo " [ "$VERBOSE_MODE" ] && echo "
%% COMMAND: LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\"" %% 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 LANG=C LC_ALL=C autodist -u --rebuild -r ${JOB_CURRENT} --severity 2 -- $STAGEOPTS --changelog \"$REBUILD_CHANGELOG\" &>$tmpfile
cat $tmpfile >> $logfile
[ $? -gt 0 ] && { [ $? -gt 0 ] && {
echo "(FAILED) " echo "(FAILED) "
autoport_log ${JOB_CURRENT} update failed $tmpfile autoport_log ${JOB_CURRENT} update failed $tmpfile