pmb.helpers.repo: Show progress bar when downloading APKINDEX files (MR 1996)
Run pmbootstrap update to test
This commit is contained in:
parent
bbf0a70e5b
commit
e058841709
|
@ -179,7 +179,8 @@ def update(args, arch=None, force=False, existing_only=False):
|
|||
" (" + str(len(outdated)) + " file(s))")
|
||||
|
||||
# Download and move to right location
|
||||
for url, target in outdated.items():
|
||||
for (i, (url, target)) in enumerate(outdated.items()):
|
||||
pmb.helpers.cli.progress_print(i / len(outdated))
|
||||
temp = pmb.helpers.http.download(args, url, "APKINDEX", False,
|
||||
logging.DEBUG, True)
|
||||
if not temp:
|
||||
|
@ -189,6 +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()
|
||||
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue