From cbfd7e0d4a82da21809d87f2cedd58f3e8edc5ff Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 25 Sep 2020 10:53:07 -0300 Subject: [PATCH 1/4] [arch] fix -> info window: not displaying all installed files --- CHANGELOG.md | 5 +++++ bauh/__init__.py | 2 +- bauh/gems/arch/pacman.py | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e83395c0..c69ac98b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [0.9.8] +### Fixes +- Arch + - info window: not displaying all installed files + ## [0.9.7] 2020-09-11 ### Features - Arch diff --git a/bauh/__init__.py b/bauh/__init__.py index d4d3d035..b0041b70 100644 --- a/bauh/__init__.py +++ b/bauh/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.9.7' +__version__ = '0.9.8' __app_name__ = 'bauh' import os diff --git a/bauh/gems/arch/pacman.py b/bauh/gems/arch/pacman.py index 71b2add1..50ef39f7 100644 --- a/bauh/gems/arch/pacman.py +++ b/bauh/gems/arch/pacman.py @@ -178,17 +178,19 @@ def map_desktop_files(*pkgnames) -> Dict[str, List[str]]: def list_installed_files(pkgname: str) -> List[str]: - installed_files = new_subprocess(['pacman', '-Qlq', pkgname]) + installed_files = run_cmd('pacman -Qlq {}'.format(pkgname), print_error=False) - f_paths = [] + paths = [] - for out in new_subprocess(['grep', '-E', '/.+\..+[^/]$'], stdin=installed_files.stdout).stdout: - if out: - line = out.decode().strip() - if line: - f_paths.append(line) + if installed_files: + for f in installed_files.split('\n'): + if f: + f_strip = f.strip() - return f_paths + if f_strip and not f_strip.endswith('/'): + paths.append(f_strip) + + return paths def verify_pgp_key(key: str) -> bool: From a205c7cca8fb1cc520635f732d48403c7306a66f Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 25 Sep 2020 11:15:28 -0300 Subject: [PATCH 2/4] [appimage] fix -> 'Checking symlinks' initial task hanging if an installed AppImage data does not contain the installed directory field --- CHANGELOG.md | 4 +++- bauh/gems/appimage/worker.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c69ac98b..7d1b9eed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [0.9.8] ### Fixes - Arch - - info window: not displaying all installed files + - info window: not displaying all installed files +- AppImage + - "Checking symlinks" initial task hanging if an installed AppImage data does not contain the installed directory field ('install_dir') ## [0.9.7] 2020-09-11 ### Features diff --git a/bauh/gems/appimage/worker.py b/bauh/gems/appimage/worker.py index 8936c52d..5edbd9dd 100644 --- a/bauh/gems/appimage/worker.py +++ b/bauh/gems/appimage/worker.py @@ -190,7 +190,11 @@ class SymlinksVerifier(Thread): data = None if data and not data.get('symlink'): + if not data.get('install_dir'): + data['install_dir'] = '/'.join(json_file.split('/')[0:-1]) + app = AppImage(**data, i18n=self.i18n) + file_path = util.find_appimage_file(app.install_dir) if file_path: From f4b6da408f3e795a39ad306fc9f3bbbf39e59be1 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 2 Oct 2020 09:45:17 -0300 Subject: [PATCH 3/4] [arch] fix -> upgrade: sometimes crashing when there are packages to be removed --- CHANGELOG.md | 2 ++ bauh/gems/arch/updates.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d1b9eed..a3fda9b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixes - Arch - info window: not displaying all installed files + - upgrade: + - sometimes crashing when there are packages to be removed - AppImage - "Checking symlinks" initial task hanging if an installed AppImage data does not contain the installed directory field ('install_dir') diff --git a/bauh/gems/arch/updates.py b/bauh/gems/arch/updates.py index a0c6239d..fc4d32bb 100644 --- a/bauh/gems/arch/updates.py +++ b/bauh/gems/arch/updates.py @@ -501,7 +501,7 @@ class UpdatesSummarizer: deps_no_data = {dep for dep in required_by_installed if dep in context.pkgs_data} deps_nodata_deps = pacman.map_required_dependencies(*deps_no_data) if deps_no_data else {} - reverse_to_remove_provided = {p: name for name, provided in to_remove_provided for p in provided} + reverse_to_remove_provided = {p: name for name, provided in to_remove_provided.items() for p in provided} for pkg in required_by_installed: if pkg not in context.to_remove: From f8276024c031822c4a9b670376fd6cce508d8b7d Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Thu, 1 Oct 2020 16:40:44 -0300 Subject: [PATCH 4/4] [flatpak] fix -> not displaying the runtimes icons on the summary window --- CHANGELOG.md | 2 ++ bauh/gems/flatpak/model.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3fda9b5..2fb3d665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - sometimes crashing when there are packages to be removed - AppImage - "Checking symlinks" initial task hanging if an installed AppImage data does not contain the installed directory field ('install_dir') +- Flatpak + - not displaying the runtimes icons on the summary window ## [0.9.7] 2020-09-11 ### Features diff --git a/bauh/gems/flatpak/model.py b/bauh/gems/flatpak/model.py index aa00e256..16c2506a 100644 --- a/bauh/gems/flatpak/model.py +++ b/bauh/gems/flatpak/model.py @@ -120,3 +120,7 @@ class FlatpakApplication(SoftwarePackage): def __eq__(self, other): if isinstance(other, FlatpakApplication): return self.id == other.id and self.installation == other.installation and self.branch == other.branch + + def get_disk_icon_path(self) -> str: + if not self.runtime: + return super(FlatpakApplication, self).get_disk_icon_path()