webbuild-sudo: fix defining builddir for %setup without -n argument
This commit is contained in:
parent
ad1c0cad9f
commit
23fd85f414
@ -93,10 +93,10 @@ if [ "$MODE" = "specinfo" ]; then
|
||||
echo "SPECVAR_Specfile=\"$SPECFILE\""
|
||||
# Resolve builddir by parsing %setup macro or use default
|
||||
BUILDDIR_UNPARSED=`grep "^%setup" ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec | sed "s|.*-n \([^[:space:]]*\).*|\1|"`
|
||||
if [ ! "$BUILDDIR_UNPARSED" ]; then
|
||||
if [ "$BUILDDIR_UNPARSED/%setup" != "$BUILDDIR_UNPARSED" ]; then
|
||||
BUILDDIR_UNPARSED="$PACKAGE-%{version}"
|
||||
fi
|
||||
BUILDDIR=`rpmspec -q --srpm --queryformat \"${BUILDDIR_UNPARSED}\" ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec`
|
||||
BUILDDIR=`rpmspec -q --srpm --queryformat "${BUILDDIR_UNPARSED}" ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec`
|
||||
while read line; do
|
||||
set -- $line
|
||||
[ "$1" = "%package" -o "$1" = "%description" ] && break
|
||||
|
Loading…
Reference in New Issue
Block a user