cli: --details-to-stdout: no progress bars (MR 2007)

Hide progress bars if --details-to-stdout is used, which redirects all
output that would land in the pmbootstrap log to stdout. This caused the
progress bar output to get mixed with the apk output. A new progress bar
would get drawn whenever a new package was installed, without removing
the previous progress bar.
This commit is contained in:
Oliver Smith 2020-12-15 14:35:56 +01:00
parent 1eac61bcf7
commit a9d4ba32a2
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 8 additions and 8 deletions

View file

@ -180,7 +180,7 @@ def update(args, arch=None, force=False, existing_only=False):
# Download and move to right location
for (i, (url, target)) in enumerate(outdated.items()):
pmb.helpers.cli.progress_print(i / len(outdated))
pmb.helpers.cli.progress_print(args, i / len(outdated))
temp = pmb.helpers.http.download(args, url, "APKINDEX", False,
logging.DEBUG, True)
if not temp:
@ -190,7 +190,7 @@ def update(args, arch=None, force=False, existing_only=False):
if not os.path.exists(target_folder):
pmb.helpers.run.root(args, ["mkdir", "-p", target_folder])
pmb.helpers.run.root(args, ["cp", temp, target])
pmb.helpers.cli.progress_flush()
pmb.helpers.cli.progress_flush(args)
return True