Skip to content

Commit e2d31ea

Browse files
authored
0.10.0
2 parents a08814c + 53d7e53 commit e2d31ea

133 files changed

Lines changed: 5445 additions & 624 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,89 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [0.10.0] 2022-03-14
8+
9+
### Features
10+
- Debian
11+
- allowing Debian packages to be managed
12+
- required dependencies: **aptitude**
13+
- basic actions supported: **search**, **install**, **uninstall**, **upgrade**
14+
- custom actions supported:
15+
- **synchronize packages**: synchronize the available packages on the repository (`aptitude update`)
16+
- **index applications**: maps runnable installed packages (automatically done during initialization)
17+
- **software sources**: launches the application responsible for managing software sources (at the moment only `software-properties-gtk` is supported)
18+
- custom package actions supported:
19+
- **purge**: removes the packages and all related configuration files
20+
21+
<p align="center">
22+
23+
p>
24+
25+
- AppImage
26+
- new custom action to self install bauh if it is running as an AppImage
27+
28+
<p align="center">
29+
30+
p>
31+
32+
- Arch
33+
- AUR:
34+
- able to filter orphan packages by the new "orphan" category [#236](https://github.com/vinifmor/bauh/issues/236)
35+
- able to filter outdated packages by the new "out of date" category [#236](https://github.com/vinifmor/bauh/issues/236)
36+
37+
### Improvements
38+
- General
39+
- minor memory improvements
40+
- code refactoring
41+
- update checking interval on tray mode is now measured **in minutes** instead of seconds (default: 5)
42+
43+
- Arch
44+
- info dialog:
45+
- displaying the "executable" field if the package is recognized as an application
46+
- displaying "description" and "version" as primary fields for repository packages
47+
- displaying the "out of date" field for AUR packages [#236](https://github.com/vinifmor/bauh/issues/236)
48+
- displaying the "orphan" field for AUR packages [#236](https://github.com/vinifmor/bauh/issues/236)
49+
- removing the "%U" parameter before launching applications to prevent error messages
50+
- minor code refactoring
51+
52+
- Flatpak
53+
- cli/tray: removed some unneeded API calls when listing updates [#234](https://github.com/vinifmor/bauh/issues/234)
54+
55+
- UI
56+
- search:
57+
- sorting packages by closest match instead of considering installed first
58+
- new "Installed" filter
59+
<p align="center">
60+
61+
p>
62+
63+
- upgrade summary dialog size
64+
- displaying tips for some custom actions (on mouse hover)
65+
- screenshots: displaying the current image index as a label in the button bar (e.g: 1/3)
66+
- some unneeded cursor icons removed from the apps table
67+
- some icons replaced
68+
69+
- Distribution
70+
- AppImage: -~9% size reduction (96.32 MB -> 88.16 MB)
71+
72+
### Fixes
73+
- General
74+
- not accepting blank root passwords [#235](https://github.com/vinifmor/bauh/issues/235)
75+
- human-readable sizes (packages, files, updates, ...)
76+
77+
- AppImage
78+
- info: displaying attributes related to the installation after the application has been removed (search)
79+
- history: not properly sorting releases by version
80+
81+
- Arch:
82+
- AUR:
83+
- info: exception when trying to retrieve the PKGBUILD of a package without a base defined
84+
85+
- UI
86+
- some package icons would not appear if there is no URL associated with them
87+
- info: not displaying boolean fields
88+
89+
790
## [0.9.28] 2022-02-14
891

992
### Fixes

‎README.md‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![GitHub release](https://img.shields.io/github/release/vinifmor/bauh.svg?label=Release)](https://github.com/vinifmor/bauh/releases/) [![PyPI](https://img.shields.io/pypi/v/bauh?label=PyPI)](https://pypi.org/project/bauh) [![AUR](https://img.shields.io/aur/version/bauh?label=AUR)](https://aur.archlinux.org/packages/bauh) [![AUR-staging](https://img.shields.io/aur/version/bauh-staging?label=AUR-staging)](https://aur.archlinux.org/packages/bauh-staging) [![License](https://img.shields.io/github/license/vinifmor/bauh?label=License)](https://github.com/vinifmor/bauh/blob/master/LICENSE) [![kofi](https://img.shields.io/badge/Ko--Fi-Donate-orange?style=flat&logo=ko-fi)](https://ko-fi.com/vinifmor) [![Follow on Twitter](https://img.shields.io/twitter/follow/bauh4linux?style=social&label=Twitter)](https://twitter.com/bauh4linux)
22

3-
**bauh** (ba-oo), formerly known as **fpakman**, is a graphical interface for managing your Linux software (packages/applications). It currently supports the following formats: AppImage, ArchLinux repositories/AUR, Flatpak, Snap and Web applications.
3+
**bauh** (ba-oo), formerly known as **fpakman**, is a graphical interface for managing your Linux software (packages/applications). It currently supports the following formats: AppImage, ArchLinux repositories/AUR, Debian packages, Flatpak, Snap and Web applications.
44

55
Key features
66
- A management panel where you can: search, install, uninstall, upgrade, downgrade and launch you applications (and more...)
@@ -26,6 +26,7 @@ Key features
2626
6. [Supported types](#types)
2727
- [AppImage](#type_appimage)
2828
- [Arch packages/AUR](#type_arch)
29+
- [Debian](#type_deb)
2930
- [Flatpak](#type_flatpak)
3031
- [Snap](#type_snap)
3132
- [Native Web applications](#type_web)
@@ -50,6 +51,7 @@ Key features
5051

5152
##### Required dependencies
5253
- `fuse`: the package name may vary from distribution
54+
- `qt5dxcb-plugin` (or equivalent): the package name may vary from distribution
5355

5456
##### Steps
5557
- Download the .AppImage file attached with the latest release from https://github.com/vinifmor/bauh/releases.
@@ -69,6 +71,7 @@ Key features
6971

7072
##### Optional dependencies (they should be installed with apt-get/apt)
7173

74+
- `aptitude`: Debian package management
7275
- `timeshift`: system backup
7376
- `aria2`: multi-threaded downloads
7477
- `axel`: multi-threaded downloads alternative
@@ -202,6 +205,7 @@ bauh is officially distributed through [PyPi](https://pypi.org/project/bauh) and
202205
- `Install AppImage file`: allows to install an external AppImage file
203206
- `Upgrade file`: allows to upgrade a manually installed AppImage file
204207
- `Update database`: manually synchronize the AppImage database
208+
- `Install bauh`: installs bauh if it is running as an AppImage
205209

206210
- Installed applications are store at `~/.local/share/bauh/appimage/installed` (or `/usr/local/share/bauh/installed` for **root**)
207211
- Desktop entries (menu shortcuts) of the installed applications are stored at `~/.local/share/applications` (or `/usr/share/applications` for **root**). Name pattern: `bauh_appimage_appname.desktop`
@@ -285,6 +289,22 @@ aur_rebuild_detector: true # it checks if packages built with old library versio
285289
prefer_repository_provider: true # when there is just one repository provider for a given a dependency and several from AUR, it will be automatically picked.
286290
```
287291

292+
##### <a name="type_deb">Debian packages<a>
293+
- Basic actions supported: **search**, **install**, **uninstall**, **upgrade**
294+
- Custom actions supported:
295+
- **synchronize packages**: synchronize the available packages on the repository (`aptitude update`)
296+
- **index applications**: maps runnable installed packages (automatically done during initialization)
297+
- **software sources**: launches the application responsible for managing software sources (at the moment only `software-properties-gtk` is supported)
298+
- Custom package actions supported:
299+
- **purge**: removes the packages and all related configuration files
300+
- Files:
301+
- runnable applications index: `~/.cache/bauh/debian/apps_idx.json` (or `/var/cache/bauh/debian/apps_idx.json` for **root**)
302+
- package suggestions: `~/.cache/bauh/debian/suggestions.txt` (or `/var/cache/bauh/debian/suggestions.txt` for **root**)
303+
- configuration: `~/.config/bauh/debian.yml` or `/etc/bauh/debian.yml`
304+
- `index_apps.exp`: time period (**in minutes**) in which the installed applications cache is considered up-to-date during startup (default: `1440` -> 24 hours)
305+
- `sync_pkgs.time`: time period (**in minutes**) in which the packages synchronization must be done on startup (default: `1440` -> 24 hours)
306+
- `suggestions.exp`: it defines the period (**in hours**) in which the suggestions stored in disc will be considered up to date. Use 0 if you always want to update them.
307+
- `pkg_sources.app`: it defines the application for managing the software sources. A `null` value detects one of the supported applications automatically.
288308

289309
##### <a name="type_flatpak">Flatpaka>
290310

@@ -409,7 +429,7 @@ ui:
409429
theme: defines the path to the theme/stylesheet file with a .qss extension (e.g: /path/to/my/theme.qss). For themes provided by bauh, only a string key is needed (e.g: light). Default: light
410430
system_theme: merges the system's theme/stylesheet with bauh's. Default: false.
411431
updates:
412-
check_interval: 30 # the updates checking interval in SECONDS
432+
check_interval: 5 # the updates checking interval in minutes
413433
ask_for_reboot: true # if a dialog asking for a system reboot should be displayed after a successful upgrade
414434
disk:
415435
trim:

‎bauh/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '0.9.28'
1+
__version__ = '0.10.0'
22
__app_name__ = 'bauh'
33

44
import os

‎bauh/api/abstract/context.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class ApplicationContext:
1414
def __init__(self, download_icons: bool, http_client: HttpClient, app_root_dir: str, i18n: I18n,
1515
cache_factory: MemoryCacheFactory, disk_loader_factory: DiskCacheLoaderFactory,
1616
logger: logging.Logger, file_downloader: FileDownloader, distro: str, app_name: str,
17-
internet_checker: InternetChecker, root_user: bool):
17+
app_version: str, internet_checker: InternetChecker, root_user: bool, screen_width: int = -1,
18+
screen_height: int = -1):
1819
"""
1920
:param download_icons: if packages icons should be downloaded
2021
:param http_client: a shared instance of http client
@@ -26,7 +27,10 @@ def __init__(self, download_icons: bool, http_client: HttpClient, app_root_dir:
2627
:param file_downloader
2728
:param distro
2829
:param app_name
30+
:param app_version
2931
:param internet_checker
32+
:param screen_width
33+
:param screen_height
3034
"""
3135
self.download_icons = download_icons
3236
self.http_client = http_client
@@ -41,9 +45,12 @@ def __init__(self, download_icons: bool, http_client: HttpClient, app_root_dir:
4145
self.default_categories = ('AudioVideo', 'Audio', 'Video', 'Development', 'Education', 'Game',
4246
'Graphics', 'Network', 'Office', 'Science', 'Settings', 'System', 'Utility')
4347
self.app_name = app_name
48+
self.app_version = app_version
4449
self.root_user = root_user
4550
self.root_password = None
4651
self.internet_checker = internet_checker
52+
self.screen_width = screen_width
53+
self.screen_height = screen_height
4754

4855
def is_system_x86_64(self):
4956
return self.arch_x86_64

‎bauh/api/abstract/controller.py‎

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from abc import ABC, abstractmethod
55
from enum import Enum
66
from pathlib import Path
7-
from typing import List, Set, Type, Tuple, Optional, Generator
7+
from typing import List, Set, Type, Tuple, Optional, Generator, TypeVar
88

99
import yaml
1010

@@ -15,10 +15,12 @@
1515
CustomSoftwareAction
1616
from bauh.api.abstract.view import ViewComponent
1717

18+
P = TypeVar('P', bound=SoftwarePackage)
19+
1820

1921
class SearchResult:
2022

21-
def __init__(self, installed: Optional[List[SoftwarePackage]], new: Optional[List[SoftwarePackage]], total: int):
23+
def __init__(self, installed: Optional[List[P]], new: Optional[List[P]], total: int):
2224
"""
2325
:param installed: already installed packages
2426
:param new: new packages found
@@ -40,9 +42,19 @@ def update_total(self):
4042
self.total = total
4143

4244
@classmethod
43-
def empty(cls):
45+
def empty(cls) -> "SearchResult":
4446
return cls(installed=[], new=[], total=0)
4547

48+
def __eq__(self, other):
49+
if isinstance(other, SearchResult):
50+
if self.installed == other.installed:
51+
return self.new == other.new
52+
53+
return False
54+
55+
def __hash__(self):
56+
return hash(self.installed) + hash(self.new)
57+
4658

4759
class UpgradeRequirement:
4860

@@ -69,7 +81,7 @@ def sort_by_priority(req: "UpgradeRequirement") -> Tuple[int, str]:
6981
class UpgradeRequirements:
7082

7183
def __init__(self, to_install: Optional[List[UpgradeRequirement]], to_remove: Optional[List[UpgradeRequirement]],
72-
to_upgrade: List[UpgradeRequirement], cannot_upgrade: Optional[List[UpgradeRequirement]]):
84+
to_upgrade: Optional[List[UpgradeRequirement]], cannot_upgrade: Optional[List[UpgradeRequirement]]):
7385
"""
7486
:param to_install: additional packages that must be installed with the upgrade
7587
:param to_remove: non upgrading packages that should be removed due to conflicts with upgrading packages
@@ -143,7 +155,7 @@ def read_installed(self, disk_loader: Optional[DiskCacheLoader], limit: int, onl
143155
pass
144156

145157
@abstractmethod
146-
def downgrade(self, pkg: SoftwarePackage, root_password: str, handler: ProcessWatcher) -> bool:
158+
def downgrade(self, pkg: SoftwarePackage, root_password: Optional[str], handler: ProcessWatcher) -> bool:
147159
"""
148160
downgrades a package version
149161
:param pkg:
@@ -162,7 +174,7 @@ def clean_cache_for(self, pkg: SoftwarePackage):
162174
if pkg.supports_disk_cache() and os.path.exists(pkg.get_disk_cache_path()):
163175
shutil.rmtree(pkg.get_disk_cache_path())
164176

165-
def get_upgrade_requirements(self, pkgs: List[SoftwarePackage], root_password: str, watcher: ProcessWatcher) -> UpgradeRequirements:
177+
def get_upgrade_requirements(self, pkgs: List[SoftwarePackage], root_password: Optional[str], watcher: ProcessWatcher) -> UpgradeRequirements:
166178
"""
167179
return additional required software that needs to be installed / removed / updated before updating a list of packages
168180
:param pkgs:
@@ -172,7 +184,7 @@ def get_upgrade_requirements(self, pkgs: List[SoftwarePackage], root_password: s
172184
return UpgradeRequirements(None, None, [UpgradeRequirement(p) for p in pkgs], None)
173185

174186
@abstractmethod
175-
def upgrade(self, requirements: UpgradeRequirements, root_password: str, watcher: ProcessWatcher) -> bool:
187+
def upgrade(self, requirements: UpgradeRequirements, root_password: Optional[str], watcher: ProcessWatcher) -> bool:
176188
"""
177189
:param requirements:
178190
:param root_password: the root user password (if required)
@@ -182,7 +194,7 @@ def upgrade(self, requirements: UpgradeRequirements, root_password: str, watcher
182194
pass
183195

184196
@abstractmethod
185-
def uninstall(self, pkg: SoftwarePackage, root_password: str, watcher: ProcessWatcher, disk_loader: Optional[DiskCacheLoader]) -> TransactionResult:
197+
def uninstall(self, pkg: SoftwarePackage, root_password: Optional[str], watcher: ProcessWatcher, disk_loader: Optional[DiskCacheLoader]) -> TransactionResult:
186198
"""
187199
:param pkg:
188200
:param root_password: the root user password (if required)
@@ -217,7 +229,7 @@ def get_history(self, pkg: SoftwarePackage) -> PackageHistory:
217229
pass
218230

219231
@abstractmethod
220-
def install(self, pkg: SoftwarePackage, root_password: str, disk_loader: Optional[DiskCacheLoader], watcher: ProcessWatcher) -> TransactionResult:
232+
def install(self, pkg: SoftwarePackage, root_password: Optional[str], disk_loader: Optional[DiskCacheLoader], watcher: ProcessWatcher) -> TransactionResult:
221233
"""
222234
:param pkg:
223235
:param root_password: the root user password (if required)
@@ -334,7 +346,7 @@ def list_suggestions(self, limit: int, filter_installed: bool) -> List[PackageSu
334346
"""
335347
pass
336348

337-
def execute_custom_action(self, action: CustomSoftwareAction, pkg: SoftwarePackage, root_password: str, watcher: ProcessWatcher) -> bool:
349+
def execute_custom_action(self, action: CustomSoftwareAction, pkg: SoftwarePackage, root_password: Optional[str], watcher: ProcessWatcher) -> bool:
338350
"""
339351
At the moment the GUI implements this action. No need to implement it yourself.
340352
:param action:
@@ -355,10 +367,9 @@ def is_default_enabled(self) -> bool:
355367
def launch(self, pkg: SoftwarePackage):
356368
pass
357369

358-
@abstractmethod
359-
def get_screenshots(self, pkg: SoftwarePackage) -> List[str]:
370+
def get_screenshots(self, pkg: SoftwarePackage) -> Generator[str, None, None]:
360371
"""
361-
:return: screenshot urls for the given package
372+
:return: yields screenshot urls for the given package
362373
"""
363374
pass
364375

‎bauh/api/abstract/download.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from abc import ABC, abstractmethod
2-
from typing import Iterable, List, Optional, Tuple
2+
from typing import Iterable, List, Optional
33

44
from bauh.api.abstract.handler import ProcessWatcher
55

66

77
class FileDownloader(ABC):
88

99
@abstractmethod
10-
def download(self, file_url: str, watcher: Optional[ProcessWatcher], output_path: str, cwd: str, root_password: str = None, substatus_prefix: str = None, display_file_size: bool = True, max_threads: int = None, known_size: int = None) -> bool:
10+
def download(self, file_url: str, watcher: Optional[ProcessWatcher], output_path: str, cwd: str, root_password: Optional[str] = None, substatus_prefix: str = None, display_file_size: bool = True, max_threads: int = None, known_size: int = None) -> bool:
1111
"""
1212
:param file_url:
1313
:param watcher:

‎bauh/api/abstract/handler.py‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ def print(self, msg: str):
1717
"""
1818
pass
1919

20-
def request_confirmation(self, title: str, body: Optional[str], components: List[ViewComponent] = None, confirmation_label: str = None,
21-
deny_label: str = None, deny_button: bool = True, window_cancel: bool = False,
22-
confirmation_button: bool = True) -> bool:
20+
def request_confirmation(self, title: str, body: Optional[str], components: List[ViewComponent] = None,
21+
confirmation_label: str = None, deny_label: str = None, deny_button: bool = True,
22+
window_cancel: bool = False, confirmation_button: bool = True,
23+
min_width: Optional[int] = None,
24+
min_height: Optional[int] = None) -> bool:
2325
"""
2426
request a user confirmation. In the current GUI implementation, it shows a popup to the user.
2527
:param title: popup title
@@ -30,6 +32,8 @@ def request_confirmation(self, title: str, body: Optional[str], components: List
3032
:param deny_button: if the deny button should be displayed
3133
:param window_cancel: if the window cancel button should be visible
3234
:param confirmation_button: if the confirmation button should be displayed
35+
:param min_width: minimum width for the confirmation dialog
36+
:param min_height: minimum height for the confirmation dialog
3337
:return: if the request was confirmed by the user
3438
"""
3539
pass

0 commit comments

Comments
 (0)