Commit 60d1a0eb authored by Vitaly Lipatov's avatar Vitaly Lipatov

myhsh: use native hasher --faketty instead of faketty wrapper

parent d223e6ca
...@@ -136,9 +136,10 @@ if [ -z "$NOSTRICT_UNPACKAGED" ] ; then ...@@ -136,9 +136,10 @@ if [ -z "$NOSTRICT_UNPACKAGED" ] ; then
BUILDARGS="--define '_unpackaged_files_terminate_build 1'" BUILDARGS="--define '_unpackaged_files_terminate_build 1'"
fi fi
# Note: colored compiler output in hasher requires passing -fdiagnostics-color=always # Use --faketty for colored compiler output (if supported by hasher)
# to gcc inside chroot, which is not easily achievable through rpmbuild --define if $HSH --help 2>&1 | grep -q -- --faketty ; then
# (optflags self-reference causes recursion). For now, colors work in rpmbb but not here. HASHERARG="$HASHERARG --faketty"
fi
LISTBUILTSH="" LISTBUILTSH=""
for i in $LISTNAMES for i in $LISTNAMES
...@@ -150,11 +151,11 @@ do ...@@ -150,11 +151,11 @@ do
if [ -n "$REBUILD" ] ; then if [ -n "$REBUILD" ] ; then
# Note: hasher already uses renice for low priority # Note: hasher already uses renice for low priority
showcmd $HSH-rebuild $HASHERARG --rpmbuild-args "$BUILDARGS" -- $HASHERDIR $i showcmd $HSH-rebuild $HASHERARG --rpmbuild-args "$BUILDARGS" -- $HASHERDIR $i
(faketty "$HSH-rebuild $HASHERARG --rpmbuild-args \"$BUILDARGS\" -- $HASHERDIR $i" && touch $LOGFILE.ok) 2>&1 | tee >(stripcolors >> $LOGFILE) ($HSH-rebuild $HASHERARG --rpmbuild-args "$BUILDARGS" -- $HASHERDIR $i && touch $LOGFILE.ok) 2>&1 | tee >(stripcolors >> $LOGFILE)
else else
# Note: hasher already uses renice for low priority # Note: hasher already uses renice for low priority
showcmd $HSH $HASHERARG --apt-config=$OURAPTCONF --rpmbuild-args "$BUILDARGS" -- $HASHERDIR $i showcmd $HSH $HASHERARG --apt-config=$OURAPTCONF --rpmbuild-args "$BUILDARGS" -- $HASHERDIR $i
(faketty "$HSH $HASHERARG --apt-config=$OURAPTCONF --rpmbuild-args \"$BUILDARGS\" -- $HASHERDIR $i" && touch $LOGFILE.ok) 2>&1 | tee >(stripcolors >> $LOGFILE) ($HSH $HASHERARG --apt-config=$OURAPTCONF --rpmbuild-args "$BUILDARGS" -- $HASHERDIR $i && touch $LOGFILE.ok) 2>&1 | tee >(stripcolors >> $LOGFILE)
fi fi
test -L $HASHERDIR/BUILD || ln -s chroot/usr/src/RPM/BUILD $HASHERDIR/ test -L $HASHERDIR/BUILD || ln -s chroot/usr/src/RPM/BUILD $HASHERDIR/
if [ ! -f $LOGFILE.ok ] ; then if [ ! -f $LOGFILE.ok ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment