Updated for check db

This commit is contained in:
Dimitris Zlatanidis 2023-03-30 10:17:47 +03:00
parent 11f0b36927
commit 339559372f
3 changed files with 7 additions and 4 deletions

View file

@ -84,5 +84,6 @@ class Check(Configs):
""" Checking for empty table and database file. """
db = Path(self.db_path, self.database_name)
if not self.session.query(self.repo_table).first() or not db.is_file():
self.utils.raise_error_message("You need to update the package lists first.\n"
" Please run 'slpkg update'")
self.utils.raise_error_message("You need to update the package lists first, run:\n\n"
" $ 'slpkg update'\n"
" $ 'slpkg update --bin-repo='*' for binaries")

View file

@ -626,7 +626,6 @@ class Argparse(Configs):
if len(self.args) >= 2:
self.check.is_empty_database()
packages: list = self.is_file_list_packages()
if self.utils.is_option(self.flag_searches, self.flags):

View file

@ -207,7 +207,10 @@ class ViewMessage(Configs):
for pkg in packages:
upgradeable: bool = self.upgrade.is_package_upgradeable(pkg)
upgradeable: bool = False
if option != 'remove':
upgradeable: bool = self.upgrade.is_package_upgradeable(pkg)
installed: str = self.utils.is_package_installed(pkg)
if not installed: