[arch] fix -> crashing when trying to upgrade AUR packages which data could not be retrieved

This commit is contained in:
Vinicius Moreira
2021-02-01 14:01:45 -03:00
parent 90a1c28960
commit 8030e6cbe8
2 changed files with 5 additions and 2 deletions

View File

@@ -10,6 +10,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- nativefier URL moved to [bauh-files](https://github.com/vinifmor/bauh-files/blob/master/web/env/v1/environment.yml) - nativefier URL moved to [bauh-files](https://github.com/vinifmor/bauh-files/blob/master/web/env/v1/environment.yml)
### Fixes ### Fixes
- Arch
- crashing when trying to upgrade AUR packages which data could not be retrieved
- Installation setup - Installation setup
- wrong style resources paths - wrong style resources paths

View File

@@ -632,8 +632,8 @@ def map_updates_data(pkgs: Iterable[str], files: bool = False) -> dict:
else: else:
output = run_cmd('pacman -Si {}'.format(' '.join(pkgs))) output = run_cmd('pacman -Si {}'.format(' '.join(pkgs)))
res = {}
if output: if output:
res = {}
latest_name = None latest_name = None
data = {'ds': None, 's': None, 'v': None, 'c': None, 'p': None, 'd': None, 'r': None} data = {'ds': None, 's': None, 'v': None, 'c': None, 'p': None, 'd': None, 'r': None}
latest_field = None latest_field = None
@@ -713,7 +713,7 @@ def map_updates_data(pkgs: Iterable[str], files: bool = False) -> dict:
else: else:
data[latest_field].update((w.strip() for w in l.split(' ') if w)) data[latest_field].update((w.strip() for w in l.split(' ') if w))
return res return res
def upgrade_several(pkgnames: Iterable[str], root_password: str, overwrite_conflicting_files: bool = False, skip_dependency_checks: bool = False) -> SimpleProcess: def upgrade_several(pkgnames: Iterable[str], root_password: str, overwrite_conflicting_files: bool = False, skip_dependency_checks: bool = False) -> SimpleProcess: