[Bug 12367] temporary lines in --progress output are not cleared
https://bugzilla.samba.org/show_bug.cgi?id=12367 --- Comment #3 from Wayne Davison--- Actually, I diagnosed this further, and noticed that the file counts shouldn't be output at all -- the check for progress output was being fooled by a temporary setting of the xfer_dirs var when -R is used without -d or -r. I've changed the show_filelist_p function into a var that is set during the init call so that it is always evaluated the same way. This git commit also contains a fix for the newline that could get output with --quiet: ff66fd4bb -- You are receiving this mail because: You are the QA Contact for the bug. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
[SCM] The rsync repository. - branch master updated
The branch, master has been updated via ff66fd4 More fixes for --progress quirks. from e02b89d We need a LF after filelist-progress with a CR. Fixes bug 12367. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit ff66fd4bb6cc76488c6ea1e4b651a869847f6375 Author: Wayne DavisonDate: Sat Oct 29 14:47:58 2016 -0700 More fixes for --progress quirks. This patch avoids inconsistent evaluation of options in the show_filelist_p() function by turning it into a var. We also avoid setting "output_needs_newline" if --quiet was specified. --- Summary of changes: flist.c| 28 progress.c | 3 ++- 2 files changed, 18 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/flist.c b/flist.c index 4a9f4e6..54ced36 100644 --- a/flist.c +++ b/flist.c @@ -37,6 +37,7 @@ extern int checksum_type; extern int module_id; extern int ignore_errors; extern int numeric_ids; +extern int quiet; extern int recurse; extern int use_qsort; extern int xfer_dirs; @@ -128,6 +129,7 @@ static char tmp_sum[MAX_DIGEST_LEN]; static char empty_sum[MAX_DIGEST_LEN]; static int flist_count_offset; /* for --delete --progress */ +static int show_filelist_progress; static void flist_sort_and_clean(struct file_list *flist, int strip_root); static void output_flist(struct file_list *flist); @@ -140,15 +142,14 @@ void init_flist(void) } parse_checksum_choice(); /* Sets checksum_type && xfersum_type */ checksum_len = csum_len_for_type(checksum_type); -} -static int show_filelist_p(void) -{ - return INFO_GTE(FLIST, 1) && xfer_dirs && !am_server && !inc_recurse; + show_filelist_progress = INFO_GTE(FLIST, 1) && xfer_dirs && !am_server && !inc_recurse; } static void start_filelist_progress(char *kind) { + if (quiet) + return; rprintf(FCLIENT, "%s ... ", kind); output_needs_newline = 1; rflush(FINFO); @@ -156,25 +157,28 @@ static void start_filelist_progress(char *kind) static void emit_filelist_progress(int count) { - output_needs_newline = 0; /* avoid a newline in the middle of this filelist-progress output */ + if (quiet) + return; + if (output_needs_newline == 2) /* avoid a newline in the middle of this filelist-progress output */ + output_needs_newline = 0; rprintf(FCLIENT, " %d files...\r", count); - output_needs_newline = 1; + output_needs_newline = 2; } static void maybe_emit_filelist_progress(int count) { - if (INFO_GTE(FLIST, 2) && show_filelist_p() && (count % 100) == 0) + if (INFO_GTE(FLIST, 2) && show_filelist_progress && (count % 100) == 0) emit_filelist_progress(count); } static void finish_filelist_progress(const struct file_list *flist) { + output_needs_newline = 0; if (INFO_GTE(FLIST, 2)) { /* This overwrites the progress line */ rprintf(FINFO, "%d file%sto consider\n", flist->used, flist->used == 1 ? " " : "s "); } else { - output_needs_newline = 0; rprintf(FINFO, "done\n"); } } @@ -2089,7 +2093,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) int implied_dot_dir = 0; rprintf(FLOG, "building file list\n"); - if (show_filelist_p()) + if (show_filelist_progress) start_filelist_progress("building file list"); else if (inc_recurse && INFO_GTE(FLIST, 1) && !am_server) rprintf(FCLIENT, "sending incremental file list\n"); @@ -2363,7 +2367,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) idev_destroy(); #endif - if (show_filelist_p()) + if (show_filelist_progress) finish_filelist_progress(flist); gettimeofday(_tv, NULL); @@ -2445,7 +2449,7 @@ struct file_list *recv_file_list(int f, int dir_ndx) int64 start_read; if (!first_flist) { - if (show_filelist_p()) + if (show_filelist_progress) start_filelist_progress("receiving file list"); else if (inc_recurse && INFO_GTE(FLIST, 1) && !am_server) rprintf(FCLIENT, "receiving incremental file list\n"); @@ -2541,7 +2545,7 @@ struct file_list *recv_file_list(int f, int dir_ndx) if (DEBUG_GTE(FLIST, 2)) rprintf(FINFO, "received %d names\n", flist->used); - if (show_filelist_p()) + if (show_filelist_progress) finish_filelist_progress(flist); if (need_unsorted_flist) { diff --git a/progress.c b/progress.c index 3858fc4..d19fa25 100644 --- a/progress.c +++ b/progress.c @@ -25,6 +25,7 @@
[Bug 12367] temporary lines in --progress output are not cleared
https://bugzilla.samba.org/show_bug.cgi?id=12367 Wayne Davisonchanged: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Wayne Davison --- This is apparently only happening with no -r combined with --progress. In this case there can be a series of file-count outputs (with CR) prior to the start of the transfer, but no LF before it moves on to other output. Git commit e02b89d0d fixes this. -- You are receiving this mail because: You are the QA Contact for the bug. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
[SCM] The rsync repository. - branch master updated
The branch, master has been updated via e02b89d We need a LF after filelist-progress with a CR. Fixes bug 12367. from d1a1fec Use S_BLKSIZE when multiplying st_blocks. https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log - commit e02b89d0d35ab8acbd522983c08d2519d8bd12d4 Author: Wayne DavisonDate: Sat Oct 29 14:33:44 2016 -0700 We need a LF after filelist-progress with a CR. Fixes bug 12367. --- Summary of changes: flist.c | 2 ++ 1 file changed, 2 insertions(+) Changeset truncated at 500 lines: diff --git a/flist.c b/flist.c index acb95f7..4a9f4e6 100644 --- a/flist.c +++ b/flist.c @@ -156,7 +156,9 @@ static void start_filelist_progress(char *kind) static void emit_filelist_progress(int count) { + output_needs_newline = 0; /* avoid a newline in the middle of this filelist-progress output */ rprintf(FCLIENT, " %d files...\r", count); + output_needs_newline = 1; } static void maybe_emit_filelist_progress(int count) -- The rsync repository. ___ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs
Re: Links repeatedly being copied???
On Sun, Oct 16, 2016 at 1:17 PM, B. S.wrote: > I have for the longest time been seeing '.L..t..'s in my rsync log, > despite no changes to such in quite some time, and in trying to track it > down, been baffled. > This means that rsync is trying to set the timestamp on the symlink to match the modify-time on the source symlink. The initial dot tells you that no "transfer" is happening (i.e. no change in symlink value). Some filesystems don't allow a symlink's mtime to be set, so rsync can keep trying to set the time and never be able to succeed. You may want to use this option: --omit-link-times (-J). ..wayne.. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: -e escape rule
On Sat, Oct 29, 2016 at 5:36 AM, Samuel Williams < space.ship.travel...@gmail.com> wrote: > The command > > ssh -l backup -i /etc/synco/id_rsa -o ConnectTimeout\=60 -o BatchMode\=yes > > Is a correct and valid shell command. > It is, but there is no shell involved, and assuming that a shell is being used is invalid. Adding backslash escaping now could potentially screw up anyone currently passing a backslash in their existing rsync scripts (a small group of people, but probably non-zero). It's tempting to go ahead and do this, but I think I'll just leave it as it is. If you want to work around that buggy escaping library, you could change "ssh" to "ssh-nobs" and put the following into that file: #!/usr/bin/perl exec 'ssh', map { s/\\(.)/$1/g; $_ } @ARGV; That adds backslash removal on the way to the ssh. It does not allow you to backslash escape spaces, though, but someone could extend the script to support that. ..wayne.. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: -e escape rule
> The point is that the original escaping DOUBLE escapes an equals sign: > foo\\\=bar > It shouldn't, there's no reason to. If you paste into your command line: rsync -e ssh\ -l\ backup\ -i\ /etc/synco/id_rsa\ -o\ ConnectTimeout\\\=60\ -o\ BatchMode\\\=yes The list of arguments would be (i.e. the values in ARGV): ['rsync', '-e', 'ssh -l backup -i /etc/synco/id_rsa -o ConnectTimeout\=60 -o BatchMode\=yes'] The command ssh -l backup -i /etc/synco/id_rsa -o ConnectTimeout\=60 -o BatchMode\=yes Is a correct and valid shell command. When RSync parses this in do_cmd, it should convert the '\=` sequence into '=' but it doesn't.. This intuition is derived from the fact that if you instead passed the string to `system('ssh -l backup -i /etc/synco/id_rsa -o ConnectTimeout\=60 -o BatchMode\=yes')` that the ARGV generated would be ['ssh', '-l', 'backup', '-i', '/etc/synco/id_rsa', '-o', 'ConnectTimeout=60', '-o', 'BatchMode=yes']. Basically, even if there WAS no reason to do so, doesn't mean it's invalid or undesirable. In theory, even passing in -e \\s\\s\\h should be valid. On 30 October 2016 at 01:13, Paul Slootmanwrote: > On Sat 29 Oct 2016, Samuel Williams wrote: > >> I'm not proposing some additional characters to split on, but quite >> the opposite, to handle the backslash escaped spaces correctly and NOT >> split. Rest assured, there is no bug with the original escaping. For >> your edification: >> >> $ echo \I\'\m\ \a\ \s\t\r\i\n\g >> I'm a string > > The point is that the original escaping DOUBLE escapes an equals sign: > foo\\\=bar > It shouldn't, there's no reason to. > > > Paul > > -- > Please use reply-all for most replies to avoid omitting the mailing list. > To unsubscribe or change options: > https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: -e escape rule
On Sat 29 Oct 2016, Samuel Williams wrote: > I'm not proposing some additional characters to split on, but quite > the opposite, to handle the backslash escaped spaces correctly and NOT > split. Rest assured, there is no bug with the original escaping. For > your edification: > > $ echo \I\'\m\ \a\ \s\t\r\i\n\g > I'm a string The point is that the original escaping DOUBLE escapes an equals sign: foo\\\=bar It shouldn't, there's no reason to. Paul -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html