Updated for view installed version #168

This commit is contained in:
Dimitris Zlatanidis 2023-05-07 21:10:34 +03:00
parent fb77b57b79
commit 6e09dc6fcb
2 changed files with 9 additions and 0 deletions

View file

@ -4,6 +4,7 @@ Updated:
- Renamed the option --bin-repo with --repository
Added:
- Options --install-data to install only data into the database
- Column for package installed version (Thanks to tpiszcze)
4.8.2 - 25/04/2023
Updated:

View file

@ -66,6 +66,7 @@ class ViewMessage(Configs):
color: str = self.yellow
if mode == 'upgrade':
color: str = self.violet
package: str = self._package_and_version(package)
# Change the colors for install mode
if self.utils.is_package_installed(package) and mode == 'install':
@ -75,9 +76,16 @@ class ViewMessage(Configs):
if (self.utils.is_package_installed(package) and mode == 'install'
and self.option_for_reinstall):
color: str = self.violet
package: str = self._package_and_version(package)
self.ascii.draw_view_package(package, version, size, color, self.repository)
def _package_and_version(self, package: str) -> str:
installed_package: str = self.utils.is_package_installed(package)
version: str = self.utils.split_binary_pkg(installed_package)[1]
return f'{package}-{version}'
def view_skipping_packages(self, package: str, version: str) -> None:
""" Print the skipping packages. """
print(f'{self.yellow}Skipping{self.endc}: {package}-{version} {self.red}(already installed){self.endc}')