From 38821f47ba027709b22b7045158fec539a0e96b0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 29 Mar 2019 12:38:37 -0400 Subject: [PATCH] [unpackfs] Make comment match code - The mismatch between "ir-chk" and the comment "to-check" led me to check (ha!) the output of rsync, and it outputs "to-chk" during small transfers; make sure the comment reflects what is actually being used to track progress (which is "ir-chk"). --- src/modules/unpackfs/main.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/modules/unpackfs/main.py b/src/modules/unpackfs/main.py index 436ec6a5c..7417793e8 100644 --- a/src/modules/unpackfs/main.py +++ b/src/modules/unpackfs/main.py @@ -110,17 +110,17 @@ def file_copy(source, dest, progress_cb): for line in iter(process.stdout.readline, b''): # small comment on this regexp. - # rsync outputs three parameters in the progress. - # xfer#x => i try to interpret it as 'file copy try no. x' - # to-check=x/y, where: - # - x = number of files yet to be checked - # - y = currently calculated total number of files. - # but if you're copying directory with some links in it, the xfer# + # rsync outputs three items in the progress (in parentheses) + # - xfer#x => Interpret it as 'file copy try no. x' + # - ir-chk=x/y, where: + # - x = number of files yet to be checked + # - y = currently calculated total number of files. + # - to-chk=x/y, which is similar but seems to only be emitted when + # progress is short; these are ignored. + # + # If you're copying directory with some links in it, the xfer# # might not be a reliable counter (for one increase of xfer, many # files may be created). - # In case of manjaro, we pre-compute the total number of files. - # therefore we can easily subtract x from y in order to get real files - # copied / processed count. m = re.findall(r'xfr#(\d+), ir-chk=(\d+)/(\d+)', line.decode()) if m: