mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Remove sql support
This commit is contained in:
parent
aeb11052e5
commit
f387869951
1 changed files with 0 additions and 43 deletions
|
@ -14,9 +14,6 @@ from slpkg.install_data import InstallData
|
|||
from slpkg.repositories import Repositories
|
||||
from slpkg.check_updates import CheckUpdates
|
||||
from slpkg.sbos.sbo_generate import SBoGenerate
|
||||
from slpkg.models.models import session as Session
|
||||
from slpkg.models.models import (SBoTable, PonceTable,
|
||||
BinariesTable, LastRepoUpdated)
|
||||
|
||||
|
||||
class UpdateRepositories(Configs):
|
||||
|
@ -29,7 +26,6 @@ class UpdateRepositories(Configs):
|
|||
self.flags: list = flags
|
||||
self.repository: str = repository
|
||||
|
||||
self.session = Session
|
||||
self.view = View(flags)
|
||||
self.repos = Repositories()
|
||||
self.progress = ProgressBar()
|
||||
|
@ -358,8 +354,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.csb_repo_name)
|
||||
self.delete_last_updated(self.repos.csb_repo_name)
|
||||
self.data.install_csb_data()
|
||||
|
||||
def conraid_repository(self) -> None:
|
||||
|
@ -387,8 +381,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.conraid_repo_name)
|
||||
self.delete_last_updated(self.repos.conraid_repo_name)
|
||||
self.data.install_conraid_data()
|
||||
|
||||
def slackdce_repository(self) -> None:
|
||||
|
@ -416,8 +408,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.slackdce_repo_name)
|
||||
self.delete_last_updated(self.repos.slackdce_repo_name)
|
||||
self.data.install_slackdce_data()
|
||||
|
||||
def slackonly_repository(self) -> None:
|
||||
|
@ -446,8 +436,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.slackonly_repo_name)
|
||||
self.delete_last_updated(self.repos.slackonly_repo_name)
|
||||
self.data.install_slackonly_data()
|
||||
|
||||
def salixos_repository(self) -> None:
|
||||
|
@ -475,8 +463,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.salixos_repo_name)
|
||||
self.delete_last_updated(self.repos.salixos_repo_name)
|
||||
self.data.install_salixos_data()
|
||||
|
||||
def salixos_extra_repository(self) -> None:
|
||||
|
@ -512,8 +498,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.salixos_extra_repo_name)
|
||||
self.delete_last_updated(self.repos.salixos_extra_repo_name)
|
||||
self.data.install_salixos_extra_data()
|
||||
|
||||
def salixos_patches_repository(self) -> None:
|
||||
|
@ -549,8 +533,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.salixos_patches_repo_name)
|
||||
self.delete_last_updated(self.repos.salixos_patches_repo_name)
|
||||
self.data.install_salixos_patches_data()
|
||||
|
||||
def slackel_repository(self) -> None:
|
||||
|
@ -578,8 +560,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.slackel_repo_name)
|
||||
self.delete_last_updated(self.repos.slackel_repo_name)
|
||||
self.data.install_slackel_data()
|
||||
|
||||
def slint_repository(self) -> None:
|
||||
|
@ -607,8 +587,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.slint_repo_name)
|
||||
self.delete_last_updated(self.repos.slint_repo_name)
|
||||
self.data.install_slint_data()
|
||||
|
||||
def pprkut_repository(self) -> None:
|
||||
|
@ -636,8 +614,6 @@ class UpdateRepositories(Configs):
|
|||
self.download.download(urls)
|
||||
print()
|
||||
|
||||
self.delete_bin_database_data(self.repos.pprkut_repo_name)
|
||||
self.delete_last_updated(self.repos.pprkut_repo_name)
|
||||
self.data.install_pprkut_data()
|
||||
|
||||
def ponce_repository(self) -> None:
|
||||
|
@ -703,22 +679,3 @@ class UpdateRepositories(Configs):
|
|||
print('\x1b[?25h', self.endc, end='')
|
||||
self.repos_for_update: dict = queue.get()
|
||||
self.update_the_repositories()
|
||||
|
||||
def delete_sbo_database_data(self) -> None:
|
||||
""" Delete all the data from a table of the database. """
|
||||
self.session.query(SBoTable).delete()
|
||||
self.session.commit()
|
||||
|
||||
def delete_ponce_database_data(self) -> None:
|
||||
self.session.query(PonceTable).delete()
|
||||
self.session.commit()
|
||||
|
||||
def delete_bin_database_data(self, repo: str) -> None:
|
||||
""" Delete the repository data from a table of the database. """
|
||||
self.session.query(BinariesTable).where(BinariesTable.repo == repo).delete()
|
||||
self.session.commit()
|
||||
|
||||
def delete_last_updated(self, repo: str) -> None:
|
||||
""" Deletes the last updated date. """
|
||||
self.session.query(LastRepoUpdated).where(LastRepoUpdated.repo == repo).delete()
|
||||
self.session.commit()
|
||||
|
|
Loading…
Reference in a new issue