GNU bug report logs - #65541
New fancy progress bars writing new lines instead of updating original

Previous Next

Package: guix;

Reported by: elaexuotee <at> wilsonb.com

Date: Sat, 26 Aug 2023 01:27:01 UTC

Severity: normal

To reply to this bug, email your comments to 65541 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#65541; Package guix. (Sat, 26 Aug 2023 01:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to elaexuotee <at> wilsonb.com:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 26 Aug 2023 01:27:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: elaexuotee <at> wilsonb.com
To: bug-guix <at> gnu.org
Subject: New fancy progress bars writing new lines instead of updating original
Date: Sat, 26 Aug 2023 10:25:53 +0900
The new pretty progress bars are quite nice. One issue I am ecountering,
however, is demonstrated in the snippet below:

    オブジェクトにインデックスを付けています  71% ▕████████████████████████████████████████████████████████████████████████████████████████████▉
    オブジェクトにインデックスを付けています  74% ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏
    オブジェクトにインデックスを付けています  77% ▕█████████████████████████████████████████████████████████████████████████████████████████████████████▍
    オブジェクトにインデックスを付けています  81% ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████▋
    オブジェクトにインデックスを付けています  84% ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████▊
    オブジェクトにインデックスを付けています  87% ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████████
    オブジェクトにインデックスを付けています  90% ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████████

When preceeding text contains double-width characters, progress bar updates end
up printing new lines instead of overwriting the original. When the preceeding
text is ascii, such as for substitute downloads, then the bars work
beautifully.

My guess is that the width-calculation simply forgets to account for possible
double-width charaters in the text snippet.

Anyone else seeing this?

Cheers,
B. Wilson




Information forwarded to bug-guix <at> gnu.org:
bug#65541; Package guix. (Sat, 26 Aug 2023 07:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 65541 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: 65541 <at> debbugs.gnu.org
Cc: elaexuotee <at> wilsonb.com
Subject: Re: bug#65541: New fancy progress bars writing new lines instead of
 updating original
Date: Sat, 26 Aug 2023 09:06:27 +0200
Le Sat, 26 Aug 2023 10:25:53 +0900,
elaexuotee--- via Bug reports for GNU Guix <bug-guix <at> gnu.org> a écrit :

> The new pretty progress bars are quite nice. One issue I am
> ecountering, however, is demonstrated in the snippet below:
> 
>     オブジェクトにインデックスを付けています  71%
> ▕████████████████████████████████████████████████████████████████████████████████████████████▉
> オブジェクトにインデックスを付けています  74%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████▏
> オブジェクトにインデックスを付けています  77%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████▍
> オブジェクトにインデックスを付けています  81%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████▋
> オブジェクトにインデックスを付けています  84%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████▊
> オブジェクトにインデックスを付けています  87%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████████
> オブジェクトにインデックスを付けています  90%
> ▕█████████████████████████████████████████████████████████████████████████████████████████████████████████████████
> 
> When preceeding text contains double-width characters, progress bar
> updates end up printing new lines instead of overwriting the
> original. When the preceeding text is ascii, such as for substitute
> downloads, then the bars work beautifully.
> 
> My guess is that the width-calculation simply forgets to account for
> possible double-width charaters in the text snippet.
> 
> Anyone else seeing this?
> 
> Cheers,
> B. Wilson
> 

I don't think it's specific to the fancy bars, and I was able to
reproduce with "LANG=ja_JP.UTF-8 guix pull".

I sent a patch, now tracked https://issues.guix.gnu.org/65546, which
fixes the issue.

To test it, I did:

msgfmt po/guix/ja.po
cd ../..
mkdir -p ja/LC_MESSAGES
mv messages.mo ja/LC_MESSAGES/guix.mo
./configure --localstatedir=/var --sysconfdir=/etc --localedir=$(pwd)
make
./pre-inst-env guix pull

(if you don't specify a localedir, it'll try to find the translations
in /usr by default)

No more newlines :)




Information forwarded to bug-guix <at> gnu.org:
bug#65541; Package guix. (Fri, 01 Sep 2023 16:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 65541 <at> debbugs.gnu.org (full text, mbox):

From: chris <chris <at> bumblehead.com>
To: 65541 <at> debbugs.gnu.org
Cc: chris <at> bumblehead.com
Subject: want this patch
Date: Fri, 1 Sep 2023 09:45:19 -0700
As a CJK user hoping Julien's patch is accepted soon, this message is my "+1".




This bug report was last modified 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.