parallel: Fixed bug #62234: regression in --bar, text flood on the terminal

This commit is contained in:
Ole Tange 2022-03-31 21:28:30 +02:00
parent 88f2312390
commit cfc2eed39f
6 changed files with 49 additions and 24 deletions

6
NEWS
View file

@ -8,9 +8,11 @@ New in this release:
News about GNU Parallel:
* Bash: GNU Parallel with Curl https://gist.github.com/CMCDragonkai/5914e02df62137e47f32?permalink_comment_id=2617456
* Bash: GNU Parallel with Curl
https://gist.github.com/CMCDragonkai/5914e02df62137e47f32?permalink_comment_id=2617456
* The Pipe Operator Explained https://medium.com/geekculture/the-pipe-operator-explained-cbd41e23775a
* The Pipe Operator Explained
https://medium.com/geekculture/the-pipe-operator-explained-cbd41e23775a
20220222

View file

@ -218,9 +218,29 @@ notice, if that means I can stop worrying about rent, mortgages, bills
and retirement.
== I do not want to cite ==
== Would it not be hell if all tools showed a citation notice? ==
If you do not want to cite, then you should use another tool.
Most software is not financed through citations, thus this is unlikely
to happen.
You can even get GNU Parallel in a version with the citation notice
silenced and which you do not have to cite: You just have to pay for
it and help finance the development that way.
A lot of tools requires configuration before use, or give you 'OK. Do
not show this again'-dialog boxes until you silence those, so it is
not uncommon, that you have to do a little extra work, when running
the software for the first time.
Running 'parallel --citation' takes less than 10 seconds to run, and
if GNU Parallel does not save you 10 seconds, then you should probably
use a different tool.
== I do not want to cite and do not want to help fund development ==
If you neither want to cite nor fund development, then you should use
another tool.
If you do not want to help fund GNU Parallel, then you will not be a
happy GNU Parallel user, and thus you using another tool is the best
@ -236,6 +256,8 @@ after installing GNU Parallel is too big, then you do not have to do
it. You only need to do that if you do not want to see the citation
notice.
You can also buy a version with the citation notice silenced.
But it really only takes 10 seconds to run.

View file

@ -4,8 +4,8 @@
Quote of the month:
wow gnu parallel fucking rules
-- senior polycule reliability engineer @ilianathewitch@twitter
Tool, was ich sehr ausgiebig nutze inzwischen und lieben gelernt habe: "GNU parallel"
-- nuit @nv1t@twitter
아 parallel 너무 좋지요.
-- 어엉부엉@d_ijk_stra

View file

@ -254,7 +254,7 @@ from:tange@gnu.org
to:parallel@gnu.org, bug-parallel@gnu.org
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
Subject: GNU Parallel 20220422 ('albright<<>>') released [stable]
Subject: GNU Parallel 20220422 ('#SlavaUkrayini🌻 albright<<>>') released [stable]
GNU Parallel 20220422 ('<<>>') has been released. It is available for download at: lbry://@GnuParallel:4

View file

@ -1669,7 +1669,7 @@ sub options_hash() {
"link|xapply" => \$opt::link,
"linkinputsource|xapplyinputsource=i" => \@opt::linkinputsource,
# Before changing these lines, please read
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall of shame by removing
# these lines.
@ -1833,7 +1833,7 @@ sub parse_options(@) {
@ARGV = read_options();
# Before changing these line, please read
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be added to a public hall of shame by
# removing the lines.
@ -5158,7 +5158,7 @@ sub usage() {
" Zenodo. https://doi.org/10.5281/zenodo.6377950",
"",
# Before changing these lines, please read
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall of shame by removing
# these lines.
@ -5191,7 +5191,7 @@ sub citation_notice() {
" Zenodo. https://doi.org/10.5281/zenodo.6377950",
"",
# Before changing these line, please read
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice and
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall of shame by
# removing these lines.
@ -5199,7 +5199,7 @@ sub citation_notice() {
"If you pay 10000 EUR you should feel free to use GNU Parallel without citing.",
"",
"More about funding GNU Parallel and the citation notice:",
"https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice",
"https://www.gnu.org/software/parallel/parallel_design.html#citation-notice",
"",
"To silence this citation notice: run 'parallel --citation' once.",
""
@ -5329,7 +5329,7 @@ sub citation() {
"(Feel free to use \\nocite{tange_2022_6377950})",
"",
# Before changing these lines, please read
# https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice and
# https://www.gnu.org/software/parallel/parallel_design.html#citation-notice and
# https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt
# You accept to be put in a public hall of shame by removing
# these lines.
@ -5338,7 +5338,7 @@ sub citation() {
"",
"More about funding GNU Parallel and the citation notice:",
"https://lists.gnu.org/archive/html/parallel/2013-11/msg00006.html",
"https://www.gnu.org/software/parallel/parallel_design.html#Citation-notice",
"https://www.gnu.org/software/parallel/parallel_design.html#citation-notice",
"https://git.savannah.gnu.org/cgit/parallel.git/tree/doc/citation-notice-faq.txt",
"",
"If you send a copy of your published article to tange\@gnu.org, it will be",
@ -9542,7 +9542,8 @@ sub sshlogin_wrap($) {
if(not $monitor_parent_sshd_script) {
$monitor_parent_sshd_script =
# This will be packed in ', so only use "
::spacefree(0,'$shell = "'.($ENV{'PARALLEL_SHELL'} || '$ENV{SHELL}').'";'.
::spacefree
(0,'$shell = "'.($ENV{'PARALLEL_SHELL'} || '$ENV{SHELL}').'";'.
'$tmpdir = $ENV{"TMPDIR"} || "'.
::perl_quote_scalar($ENV{'PARALLEL_REMOTE_TMPDIR'}).'";'.
'$nice = '.$opt::nice.';'.
@ -9560,7 +9561,7 @@ sub sshlogin_wrap($) {
} while(-e $ENV{PARALLEL_TMP});
# Set $script to a non-existent file name in $TMPDIR
do {
$script = $tmpdir."/par".
$script = $tmpdir."/par-job-$ENV{PARALLEL_SEQ}_".
join"", map { (0..9,"a".."z","A".."Z")[rand(62)] } (1..5);
} while(-e $script);
# Create a script from the hex code

View file

@ -11,16 +11,16 @@
par_reload_slf_every_second() {
echo "### --slf should reload every second"
tmp=$(mktemp)
echo 5/lo >"$tmp"
echo 1/lo >"$tmp"
(
sleep 3
(echo 5/nlv.pi.dk
echo 5/localhost
echo 5/127.0.0.1) >>"$tmp"
(echo 1/localhost
echo 1/127.0.0.1) >>"$tmp"
) &
# This used to take 20 seconds
seq 20 |
stdout /usr/bin/time -f %e parallel --slf "$tmp" 'true {};sleep 10' |
# This used to take 20 seconds (version 20220322) because the
# updated --slf would only read after first job finished
seq 3 |
stdout /usr/bin/time -f %e parallel-20220322 --slf "$tmp" 'true {};sleep 10' |
perl -ne '$_ < 20 and print "OK\n"'
rm "$tmp"
}