Re: How to supress prompt on bc 5.3.1,Re: How to supress prompt on bc 5.3.1

From: Stefan Esser <se_at_FreeBSD.org>
Date: Thu, 16 Jun 2022 09:45:53 UTC
Am 16.06.22 um 03:22 schrieb Michael Butler:
> On 6/15/22 18:47, Masachika ISHIZUKA wrote:
>>>>>    I updated to master-n256084-5dd1f6f1441 (1400061) and this
>>>>> leads to bc to 5.3.1.
>>>>>    Previosly, 'BC-ENV-APRG=-P' or 'bc -P' were working but it
>>>>> doesn't work on 5.3.1.  Is there any way to supress prompt ?
>>>>
>>>> This is fixed in 5.3.2:
>>>
>>> This version is already available as a port, but it cannot be
>>> built in the base system at the default WARNS level.
>>>
>>> I had suggested a different patch that was tested in base and
>>> have re-submitted that patch after noticing the issue with the
>>> current code.
>>
>>    Thank you for commit.
>>
>>    'bc' 5.3.3 works fine on master-n256152-ce00b11940a.
> 
> There's still some remaining buildworld left-overs in /tmp from this series of
> updates ..
> 
> imb@toshi:/home/imb> ll /tmp/*tmp
> -rw-r--r--  1 root  wheel  6768 Jun 15 12:18 /tmp/bc_help.txt.XBwzl9An2r.tmp
> -rw-r--r--  1 root  wheel  6768 Jun 15 11:26 /tmp/bc_help.txt.zLR884lFpG.tmp
> -rw-r--r--  1 root  wheel  5797 Jun 15 12:18 /tmp/dc_help.txt.RGfFwWi2Yh.tmp
> -rw-r--r--  1 root  wheel  5797 Jun 15 11:26 /tmp/dc_help.txt.oltK8Dc7mR.tmp
> -rw-r--r--  1 root  wheel  3416 Jun 15 12:18 /tmp/lib.bc.NuspIZHi5s.tmp
> -rw-r--r--  1 root  wheel  3416 Jun 15 11:26 /tmp/lib.bc.wwZJr98NlN.tmp
> -rw-r--r--  1 root  wheel  9069 Jun 15 11:26 /tmp/lib2.bc.5ywBAhZgwg.tmp
> -rw-r--r--  1 root  wheel  9069 Jun 15 12:18 /tmp/lib2.bc.D4PYZlxfWk.tmp

These left over files appear to be due to a commented-out "rm" at the
end of scripts/functions.sh, probably due to debugging of recent changes
in gen/genstr.sh:

	# Remove multiple blank lines.
	uniq "$_filter_text_temp" "$_filter_text_out"

	# Remove the temp file.
	#rm -rf "$_filter_text_temp"	<----

	# Reset IFS.
	IFS="$_filter_text_ifs"
}

You can fix it locally by removing the "#" in front of that rm command.

I'll contact the author of this software to get this fixed in his repository
and will then import that change. (The author wants downstream versions to
not diverge from his repository and I respect this wish.)

Thank you for reporting this issue!

Best regards, STefan