mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
[improvement][arch] always retrieving the package sizes before downloading with mult-threaded clients
This commit is contained in:
@@ -18,7 +18,7 @@ def request_optional_deps(pkgname: str, pkg_repos: dict, watcher: ProcessWatcher
|
||||
opts = []
|
||||
|
||||
repo_deps = [p for p, data in pkg_repos.items() if data['repository'] != 'aur']
|
||||
sizes = pacman.get_update_size(repo_deps) if repo_deps else {}
|
||||
sizes = pacman.map_update_sizes(repo_deps) if repo_deps else {}
|
||||
|
||||
for p, d in pkg_repos.items():
|
||||
size = sizes.get(p)
|
||||
@@ -44,16 +44,13 @@ def request_optional_deps(pkgname: str, pkg_repos: dict, watcher: ProcessWatcher
|
||||
return {o.value for o in view_opts.values}
|
||||
|
||||
|
||||
def request_install_missing_deps(pkgname: str, deps: List[Tuple[str, str]], watcher: ProcessWatcher, i18n: I18n, context: "TransactionContext") -> bool:
|
||||
def request_install_missing_deps(pkgname: str, deps: List[Tuple[str, str]], watcher: ProcessWatcher, i18n: I18n) -> bool:
|
||||
msg = '<p>{}</p>'.format(i18n['arch.missing_deps.body'].format(name=bold(pkgname) if pkgname else '', deps=bold(str(len(deps)))))
|
||||
|
||||
opts = []
|
||||
|
||||
repo_deps = [d[0] for d in deps if d[1] != 'aur']
|
||||
sizes = pacman.get_update_size(repo_deps) if repo_deps else {}
|
||||
|
||||
if context and sizes:
|
||||
context.pkg_sizes.update(sizes)
|
||||
sizes = pacman.map_update_sizes(repo_deps) if repo_deps else {}
|
||||
|
||||
for dep in deps:
|
||||
size = sizes.get(dep[0])
|
||||
|
||||
Reference in New Issue
Block a user