mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Updated for view installed version #168
This commit is contained in:
parent
fb77b57b79
commit
6e09dc6fcb
2 changed files with 9 additions and 0 deletions
|
@ -4,6 +4,7 @@ Updated:
|
||||||
- Renamed the option --bin-repo with --repository
|
- Renamed the option --bin-repo with --repository
|
||||||
Added:
|
Added:
|
||||||
- Options --install-data to install only data into the database
|
- Options --install-data to install only data into the database
|
||||||
|
- Column for package installed version (Thanks to tpiszcze)
|
||||||
|
|
||||||
4.8.2 - 25/04/2023
|
4.8.2 - 25/04/2023
|
||||||
Updated:
|
Updated:
|
||||||
|
|
|
@ -66,6 +66,7 @@ class ViewMessage(Configs):
|
||||||
color: str = self.yellow
|
color: str = self.yellow
|
||||||
if mode == 'upgrade':
|
if mode == 'upgrade':
|
||||||
color: str = self.violet
|
color: str = self.violet
|
||||||
|
package: str = self._package_and_version(package)
|
||||||
|
|
||||||
# Change the colors for install mode
|
# Change the colors for install mode
|
||||||
if self.utils.is_package_installed(package) and mode == 'install':
|
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'
|
if (self.utils.is_package_installed(package) and mode == 'install'
|
||||||
and self.option_for_reinstall):
|
and self.option_for_reinstall):
|
||||||
color: str = self.violet
|
color: str = self.violet
|
||||||
|
package: str = self._package_and_version(package)
|
||||||
|
|
||||||
self.ascii.draw_view_package(package, version, size, color, self.repository)
|
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:
|
def view_skipping_packages(self, package: str, version: str) -> None:
|
||||||
""" Print the skipping packages. """
|
""" Print the skipping packages. """
|
||||||
print(f'{self.yellow}Skipping{self.endc}: {package}-{version} {self.red}(already installed){self.endc}')
|
print(f'{self.yellow}Skipping{self.endc}: {package}-{version} {self.red}(already installed){self.endc}')
|
||||||
|
|
Loading…
Add table
Reference in a new issue