From 93e836bbb49430929f7d827a9eb62246dd809f4c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Oct 2022 14:39:00 +0000 Subject: move recoverDatabase -> recoverdb --- src/backend/__init__.py | 2 +- src/backend/recoverDatabase.py | 20 -------------------- src/backend/recoverdb.py | 20 ++++++++++++++++++++ src/frontend/cli/sisyphus-cli.py | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 src/backend/recoverDatabase.py create mode 100644 src/backend/recoverdb.py diff --git a/src/backend/__init__.py b/src/backend/__init__.py index 442e116..7467185 100644 --- a/src/backend/__init__.py +++ b/src/backend/__init__.py @@ -6,7 +6,7 @@ from .installPkg import * from .installSrc import * from .killemerge import * from .purgeenv import * -from .recoverDatabase import * +from .recoverdb import * from .resolveDeps import * from .searchPkg import * from .searchSrc import * diff --git a/src/backend/recoverDatabase.py b/src/backend/recoverDatabase.py deleted file mode 100644 index c429340..0000000 --- a/src/backend/recoverDatabase.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/python3 - -import animation -import os -import sisyphus.getfs -import sisyphus.syncDatabase - -@animation.wait('recovering databases') -def cliExec(): - if os.path.exists(sisyphus.getfs.remotePackagesCsv): - os.remove(sisyphus.getfs.remotePackagesCsv) - if os.path.exists(sisyphus.getfs.remoteDescriptionsCsv): - os.remove(sisyphus.getfs.remoteDescriptionsCsv) - if os.path.exists(sisyphus.getfs.localPackagesCsv): - os.remove(sisyphus.getfs.localPackagesCsv) - if os.path.exists(sisyphus.getfs.localDatabase): - os.remove(sisyphus.getfs.localDatabase) - - sisyphus.syncDatabase.remoteTable() - sisyphus.syncDatabase.localTable() diff --git a/src/backend/recoverdb.py b/src/backend/recoverdb.py new file mode 100644 index 0000000..c429340 --- /dev/null +++ b/src/backend/recoverdb.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 + +import animation +import os +import sisyphus.getfs +import sisyphus.syncDatabase + +@animation.wait('recovering databases') +def cliExec(): + if os.path.exists(sisyphus.getfs.remotePackagesCsv): + os.remove(sisyphus.getfs.remotePackagesCsv) + if os.path.exists(sisyphus.getfs.remoteDescriptionsCsv): + os.remove(sisyphus.getfs.remoteDescriptionsCsv) + if os.path.exists(sisyphus.getfs.localPackagesCsv): + os.remove(sisyphus.getfs.localPackagesCsv) + if os.path.exists(sisyphus.getfs.localDatabase): + os.remove(sisyphus.getfs.localDatabase) + + sisyphus.syncDatabase.remoteTable() + sisyphus.syncDatabase.localTable() diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py index 5f8216a..b8de9d8 100755 --- a/src/frontend/cli/sisyphus-cli.py +++ b/src/frontend/cli/sisyphus-cli.py @@ -222,7 +222,7 @@ def rescue(): If Portage's package database is corrupted (in this case you're screwed anyway :D), only a partial resurrection will be possible. If Portage's package database is intact, full resurrection will be possible. """ - sisyphus.recoverDatabase.cliExec() + sisyphus.recoverdb.cliExec() class Branch(str, Enum): master = 'master' -- cgit v1.2.3