webbuild-sudo: support for new builddir scheme required by rpm 4.20
This commit is contained in:
parent
b211b80241
commit
5680a10d1e
@ -93,6 +93,7 @@ if [ "$MODE" = "specinfo" ]; then
|
|||||||
if [ -e $SPECFILE.tmp ]; then
|
if [ -e $SPECFILE.tmp ]; then
|
||||||
echo "SPECVAR_Specfile=\"$SPECFILE\""
|
echo "SPECVAR_Specfile=\"$SPECFILE\""
|
||||||
BUILDDIR=`grep -m1 "^_setup.*-n " $SPECFILE.tmp | sed "s|.*-n \([^[:space:]]*\).*|\1|"`
|
BUILDDIR=`grep -m1 "^_setup.*-n " $SPECFILE.tmp | sed "s|.*-n \([^[:space:]]*\).*|\1|"`
|
||||||
|
PACKAGE_VERSION=`rpmspec -q --srpm --queryformat \"%{VERSION}\" ${WORKINGHOME}/RPM/SPECS/$PACKAGE.spec`
|
||||||
while read line; do
|
while read line; do
|
||||||
set -- $line
|
set -- $line
|
||||||
[ "$1" = "%package" -o "$1" = "%description" ] && break
|
[ "$1" = "%package" -o "$1" = "%description" ] && break
|
||||||
@ -111,10 +112,10 @@ if [ "$MODE" = "specinfo" ]; then
|
|||||||
rm -f $SPECFILE.tmp
|
rm -f $SPECFILE.tmp
|
||||||
echo "SPECVAR_BUILDDIR=\"$BUILDDIR\""
|
echo "SPECVAR_BUILDDIR=\"$BUILDDIR\""
|
||||||
echo "SPECVAR_BUILDROOT=\"$PACKAGE-root\""
|
echo "SPECVAR_BUILDROOT=\"$PACKAGE-root\""
|
||||||
echo "SPECVAR_RPMBUILDDIR=\"${WORKINGHOME}/RPM/BUILD\""
|
|
||||||
echo "SPECVAR_RPMSOURCESDIR=\"${WORKINGHOME}/RPM/SOURCES\""
|
|
||||||
echo "SPECVAR_RPMBUILDROOT=\"$RPMBUILDROOT\""
|
|
||||||
echo "SPECVAR_WORKINGHOME=\"$WORKINGHOME\""
|
echo "SPECVAR_WORKINGHOME=\"$WORKINGHOME\""
|
||||||
|
echo "SPECVAR_RPMBUILDDIR=\"${WORKINGHOME}/RPM/BUILD/${PACKAGE}-${PACKAGE_VERSION}-build\""
|
||||||
|
echo "SPECVAR_RPMSOURCESDIR=\"${WORKINGHOME}/RPM/SOURCES\""
|
||||||
|
echo "SPECVAR_RPMBUILDROOT=\"${WORKINGHOME}/RPM/BUILD/${PACKAGE}-${PACKAGE_VERSION}-build/BUILDROOT\""
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user