Skip to content

Commit

Permalink
0.9.7
Browse files Browse the repository at this point in the history
  • Loading branch information
vinifmor authored Sep 11, 2020
2 parents 480580b + 21e6272 commit 19ac4ad
Show file tree
Hide file tree
Showing 92 changed files with 4,446 additions and 1,879 deletions.
146 changes: 146 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,152 @@ 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.7] 2020-09-11
### Features
- Arch
- AUR
- allowing to edit the PKGBUILD file of a package to be installed/upgraded/downgraded. If enabled, a popup will be displayed during these actions allowing the PKGBUILD to be edited.
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/aur_pkgbuild.png">
</p>
- mark a given PKGBUILD of a package as editable (if the property above is enabled, the same behavior will be applied)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/mark_pkgbuild.png">
</p>
- unmark a given PKGBUILD of a package as editable (it prevents the behavior described above to happen)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/unmark_pkgbuild.png">
</p>
- new "Check Snaps support" action: it checks all system requirements for Snaps to work properly (only available if the 'snapd' package is installed)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/unmark_pkgbuild.png">
</p>
- Snap
- new settings property **install_channel**: it allows to select an available channel during the application installation. Default: false. [#90](https://github.com/vinifmor/bauh/issues/90)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/snap_config.png">
</p>
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/snap_channels.png">
</p>
- new custom action **Change channel**: allows to change the current channel of an installed Snap
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/snap_change_channel.png">
</p>

### Improvements
- AppImage
- Manual file installation/upgrade:
- default search path set to '~/Downloads'
- trying to auto-fill the 'Name' and 'Version' fields
- Arch
- initializing task "Organizing data from installed packages" is taking about 80% less time (now is called "Indexing packages data") [#131](https://github.com/vinifmor/bauh/issues/131)
- upgrade
- upgrading firstly the keyring packages declared in **SyncFirst** (**/etc/pacman.conf**) to avoid pacman downloading issues
- only removing packages after downloading the required ones
- summary: displaying the reason a given package must be installed
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/arch_install_reason.png">
</p>
- checking specific version requirements and marking packages as "cannot upgrade" when these requirements are not met (e.g: package A depends on version 1.0 of B. If A and B were selected to upgrade, and B would be upgrade to 2.0, then B would be excluded from the transaction. This new checking behavior can be disabled through the property (**check_dependency_breakage**):
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/arch_dep_break_settings.png">
</p>
- allowing the user to bypass dependency breakage scenarios (a popup will be displayed)
- new settings property **suggest_unneeded_uninstall**: defines if the dependencies apparently no longer necessary associated with the uninstalled packages should be suggested for uninstallation. When this property is enabled it automatically disables the property **suggest_optdep_uninstall**. Default: false (to prevent new users from making mistakes)
- new settings property **suggest_optdep_uninstall**: defines if the optional dependencies associated with uninstalled packages should be suggested for uninstallation. Only the optional dependencies that are not dependencies of other packages will be suggested. Default: false (to prevent new users from making mistakes)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/arch_opt_uni.png"">
</p>
- AUR
- caching the PKGBUILD file used for the package installation/upgrade/downgrade (**~/.cache/bauh/arch/installed/$pkgname/PKGBUILD**). Directory: **~/.cache/bauh/arch/installed/my_package/PKGBUILD
- new settings property **aur_build_dir** -> it allows to define a custom build dir.
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/aur_buildir.png">
</p>
- new settings property **aur_remove_build_dir** -> it defines if a package's generated build directory should be removed after the operation is finished (installation, upgrading, ...). Default: true
- new settings property **aur_build_only_chosen**: some AUR packages have a common file definition declaring several packages to be built. When this property is 'true' only the package the user select to install will be built (unless its name is different from those declared in the PKGBUILD base). With a 'null' value a popup asking if the user wants to build all of them will be displayed. 'false' will build and install all packages. Default: true.
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/aur_build_chosen.png">
</p>
- "Multi-threaded download (repositories)" is not the default behavior anymore (current pacman download approach is faster). If your settings has this property set as 'Yes', just change it to 'No'.
- preventing a possible error when the optional deps of a given package cannot be found

- Flatpak
- creating the exports path **~/.local/share/flatpak/exports/share** (if it does not exist) and adding it to install/upgrade/downgrade/remove commands path to prevent warning messages. [#128](https://github.com/vinifmor/bauh/issues/128)
- downgrade function refactored
- Snap
- full support refactored to use the Snapd socket instead of the Ubuntu's old Snap API (which was recently disabled). Now the 'read' operations are faster, a only the icon is cached to the disk.

- UI
- faster initialization dialog: improved the way it checks for finished tasks
- 'name' filter now holds for 3 seconds instead of 2 before being applied
- minor improvements

### Fixes
- AppImage
- manual file installation
- crashing if the AppImage icon is not on the extracted folder root path [#132](https://github.com/vinifmor/bauh/issues/132)
- not properly retrieving the 'Category' field options translated
- some environment variable are not available during the launch process
- Arch
- not able to upgrade a package that explicitly defines a conflict with itself (e.g: grub)
- downloading some AUR packages sources twice when multi-threaded download is enabled
- upgrade summary
- not displaying all packages that must be uninstalled
- displaying "required size" for packages that must be uninstalled
- not displaying packages that cannot upgrade due to specific version requirements (e.g: package A requires version 1.0 of package B, however package B will be upgrade to version 2.0)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/arch_dep_break.png">
</p>
- some conflict resolution scenarios when upgrading several packages
- not handling conflicting files errors during the installation process
- displaying wrong progress during the upgrade process when there are packages to install and upgrade
- uninstall: not detecting hard requirements properly
- not displaying and uninstalling dependent packages during conflict resolutions
- some environment variables are not available during the common operations (install, upgrade, downgrade, uninstall, makepkg, launch)
- AUR
- info dialog of installed packages displays the latest PKGBUILD file instead of the one used for installation/upgrade/downgrade (the fix will only work for new installed packages)
- multi-threaded download: not retrieving correctly some source files URLs (e.g: linux-xanmod-lts)
- importing PGP keys (Generic error). Now the key server is specified: `gpg --keyserver SERVER --recv-key KEYID` (the server address is retrieved from [bauh-files](https://github.com/vinifmor/bauh-files/blob/master/arch/gpgservers.txt))
- not installing the correct package built when several are generated (e.g: linux-xanmod-lts)
- some packages dependencies cannot be downloaded due to the wrong download URL (missing the 'pkgbase' field to determine the proper url)
- not properly extracting srcinfo data when several pkgnames are declared (leads to wrong dependencies requirements)
- not detecting some package updates
- not properly handling AUR package dependencies with specific versions. e.g: abc>=1.20

- Flatpak
- downgrading crashing with version 1.8.X
- history: the top commit is returned as "(null)" in version 1.8.X
- crashing when an update size cannot be read -> [#130](https://github.com/vinifmor/bauh/issues/130) [#133](https://github.com/vinifmor/bauh/issues/130)
- installation fails when there are multiple references for a given package (e.g: openh264)
<p align="center">
<img src="https://raw.githubusercontent.com/vinifmor/bauh-files/master/pictures/releases/0.9.7/flatpak_refs.png">
</p>
- some environment variables are not available during the common operations (install, upgrade, downgrade, uninstall, launch)
- minor fixes
- Snap
- not able to install classic Snaps due to Ubuntu's old Snaps API shutdown
- some environment variables are not available during the common operations (install, upgrade, downgrade, uninstall, launch)
- refresh app action: not returning an error when there is no update available
- not updating the table with the installed runtimes after a first Snap installation
- Web
- some environment variable are not available during the launch process
- UI
- crashing when nothing can be upgraded
- random C++ wrapper errors with some forms due to missing references
- application icons that cannot be rendered are being displayed as empty spaces (now the type icon is displayed instead)
- some application icons without a full path are not being rendered on the 'Upgrade summary'
- tray mode: always displaying the "About" dialog in english


## [0.9.6] 2020-06-26
### Improvements
- AppImage
Expand Down
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ installation_level: null # defines a default installation level: user or system.
#### Snap (snap)

- Supported actions: search, install, uninstall, launch, downgrade
- Custom actions: refresh
- Custom actions:
- refresh: tries to update the current Snap application revision
- change channel: allows to change the Snap application channel
- The configuration file is located at **~/.config/bauh/snap.yml** and it allows the following customizations:
```
install_channel: false # it allows to select an available channel during the application installation. Default: false
```
- Required dependencies:
- Any distro: **snapd** ( it must be enabled after its installation. Details at https://snapcraft.io/docs/installing-snapd )

Expand Down Expand Up @@ -177,6 +183,9 @@ db_updater:
- **refresh mirrors**: allows the user to define multiple mirrors locations and sort by the fastest (`sudo pacman-mirrors -c country1,country2 && sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syy`)
- **quick system upgrade**: it executes a default pacman upgrade (`pacman -Syyu --noconfirm`)
- **clean cache**: it cleans the pacman cache diretory (default: `/var/cache/pacman/pkg`)
- **mark PKGBUILD as editable**: it marks a given PKGBUILD of a package as editable (a popup with the PKGBUILD will be displayed before upgrading/downgrading this package). Action only available when the configuration property **edit_aur_pkgbuild** is not **false**.
- **unmark PKGBUILD as editable**: reverts the action described above. Action only available when the configuration property **edit_aur_pkgbuild** is not **false**.
- Installed AUR packages have their **PKGBUILD** files cached at **~/.cache/bauh/arch/installed/$pkgname**
- Packages with ignored updates are defined at **~/.config/bauh/arch/updates_ignored.txt**
- The configuration file is located at **~/.config/bauh/arch.yml** and it allows the following customizations:
```
Expand All @@ -186,11 +195,18 @@ sync_databases_startup: true # package databases synchronization once a day dur
clean_cached: true # defines if old cached versions should be removed from the disk cache during a package uninstallation
refresh_mirrors_startup: false # if the package mirrors should be refreshed during startup
mirrors_sort_limit: 5 # defines the maximum number of mirrors that will be used for speed sorting. Use 0 for no limit or leave it blank to disable sorting.
aur: true # allows to manage AUR packages
repositories: true # allows to manage packages from the configured repositories
repositories_mthread_download: true # enable multi-threaded download for repository packages if aria2 is installed
automatch_providers: true # if a possible provider for a given package dependency exactly matches its name, it will be chosen instead of asking for the user to decide (false).
```
aur: true. Default: true # allows to manage AUR packages
repositories: true # allows to manage packages from the configured repositories. Default: true
repositories_mthread_download: false # enable multi-threaded download for repository packages if aria2/axel is installed (otherwise pacman will download the packages). Default: false
automatch_providers: true # if a possible provider for a given package dependency exactly matches its name, it will be chosen instead of asking for the user to decide (false). Default: true.
edit_aur_pkgbuild: false # if the AUR PKGBUILD file should be displayed for edition before the make process. true (PKGBUILD will always be displayed for edition), false (PKGBUILD never will be displayed), null (a popup will ask if the user want to edit the PKGBUILD). Default: false.
aur_build_dir: null # defines a custom build directory for AUR packages (a null value will point to /tmp/bauh/arch (non-root user) or /tmp/bauh_root/arch (root user)). Default: null.
aur_remove_build_dir: true # it defines if a package's generated build directory should be removed after the operation is finished (installation, upgrading, ...). Options: true, false (default: true).
aur_build_only_chosen : true # some AUR packages have a common file definition declaring several packages to be built. When this property is 'true' only the package the user select to install will be built (unless its name is different from those declared in the PKGBUILD base). With a 'null' value a popup asking if the user wants to build all of them will be displayed. 'false' will build and install all packages. Default: true.
check_dependency_breakage: true # if, during the verification of the update requirements, specific versions of dependencies must also be checked. Example: package A depends on version 1.0 of B. If A and B were selected to upgrade, and B would be upgrade to 2.0, then B would be excluded from the transaction. Default: true.
suggest_unneeded_uninstall: false # if the dependencies apparently no longer necessary associated with the uninstalled packages should be suggested for uninstallation. When this property is enabled it automatically disables the property 'suggest_optdep_uninstall'. Default: false (to prevent new users from making mistakes)
suggest_optdep_uninstall: false # if the optional dependencies associated with uninstalled packages should be suggested for uninstallation. Only the optional dependencies that are not dependencies of other packages will be suggested. Default: false (to prevent new users from making mistakes)
```
- Required dependencies:
- **pacman**
- **wget**
Expand Down
2 changes: 1 addition & 1 deletion bauh/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.9.6'
__version__ = '0.9.7'
__app_name__ = 'bauh'

import os
Expand Down
19 changes: 13 additions & 6 deletions bauh/api/abstract/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import shutil
from abc import ABC, abstractmethod
from pathlib import Path
from typing import List, Set, Type, Tuple
from typing import List, Set, Type, Tuple, Optional

import yaml

Expand All @@ -17,7 +17,7 @@

class SearchResult:

def __init__(self, installed: List[SoftwarePackage], new: List[SoftwarePackage], total: int):
def __init__(self, installed: Optional[List[SoftwarePackage]], new: Optional[List[SoftwarePackage]], total: int):
"""
:param installed: already installed packages
:param new: new packages found
Expand All @@ -30,18 +30,24 @@ def __init__(self, installed: List[SoftwarePackage], new: List[SoftwarePackage],

class UpgradeRequirement:

def __init__(self, pkg: SoftwarePackage, reason: str = None, required_size: int = None, extra_size: int = None):
def __init__(self, pkg: SoftwarePackage, reason: str = None, required_size: int = None, extra_size: int = None, sorting_priority: int = 0):
"""
:param pkg:
:param reason:
:param required_size: size in BYTES required to upgrade the package
:param extra_size: the extra size IN BYTES the upgrade will allocate in relation to the already allocated
:param sorting_priority: an int representing the sorting priority (higher numbers = higher priority)
"""
self.pkg = pkg
self.reason = reason
self.required_size = required_size
self.extra_size = extra_size
self.sorting_priority = sorting_priority

@staticmethod
def sort_by_priority(req: "UpgradeRequirement") -> Tuple[int, str]:
return -req.sorting_priority, req.pkg.name


class UpgradeRequirements:
Expand All @@ -58,14 +64,15 @@ def __init__(self, to_install: List[UpgradeRequirement], to_remove: List[Upgrade
self.to_remove = to_remove # when an upgrading package conflicts with a not upgrading package ( check all the non-upgrading packages deps an add here [including those selected to upgrade as well]
self.to_upgrade = to_upgrade
self.cannot_upgrade = cannot_upgrade
self.context = {} # caches relevant data to actually perform the upgrade


class TransactionResult:
"""
The result of a given operation
"""

def __init__(self, success: bool, installed: List[SoftwarePackage], removed: List[SoftwarePackage]):
def __init__(self, success: bool, installed: Optional[List[SoftwarePackage]], removed: Optional[List[SoftwarePackage]]):
self.success = success
self.installed = installed
self.removed = removed
Expand Down Expand Up @@ -216,7 +223,7 @@ def can_work(self) -> bool:
:return: if the instance can work based on what is installed in the user's machine.
"""

def cache_to_disk(self, pkg: SoftwarePackage, icon_bytes: bytes, only_icon: bool):
def cache_to_disk(self, pkg: SoftwarePackage, icon_bytes: Optional[bytes], only_icon: bool):
"""
Saves the package data to the hard disk.
:param pkg:
Expand Down Expand Up @@ -343,7 +350,7 @@ def get_settings(self, screen_width: int, screen_height: int) -> ViewComponent:
"""
pass

def save_settings(self, component: ViewComponent) -> Tuple[bool, List[str]]:
def save_settings(self, component: ViewComponent) -> Tuple[bool, Optional[List[str]]]:
"""
:return: a tuple with a bool informing if the settings were saved and a list of error messages
"""
Expand Down
Loading

0 comments on commit 19ac4ad

Please sign in to comment.