summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-18 11:18:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-18 11:18:29 +0100
commitf28b67f3d6910f71e20da86367205f3c3660ff72 (patch)
treee911759abc66c51e8b4eb7d55ab3146bf0b45c3b
parentef7479ddce20795821190197622df79ca4259f64 (diff)
fix imports in dbsearch (no need to import the whole thing), rename it so we have something uniform
-rw-r--r--src/backend/__init__.py4
-rw-r--r--src/backend/searchbinary.py (renamed from src/backend/dbsearch.py)7
-rw-r--r--src/backend/searchebuild.py (renamed from src/backend/search.py)0
-rwxr-xr-xsrc/frontend/cli/sisyphus-cli.py4
4 files changed, 8 insertions, 7 deletions
diff --git a/src/backend/__init__.py b/src/backend/__init__.py
index c13a513..59c927c 100644
--- a/src/backend/__init__.py
+++ b/src/backend/__init__.py
@@ -6,7 +6,6 @@ from .cache import *
from .check import *
from .csvfiles import *
from .database import *
-from .dbsearch import *
from .filesystem import *
from .installbinary import *
from .installebuild import *
@@ -14,7 +13,8 @@ from .killportage import *
from .metadata import *
from .mirror import *
from .rescue import *
-from .search import *
+from .searchbinary import *
+from .searchebuild import *
from .setjobs import *
from .setprofile import *
from .solvedeps import *
diff --git a/src/backend/dbsearch.py b/src/backend/searchbinary.py
index 6e954b0..0305a14 100644
--- a/src/backend/dbsearch.py
+++ b/src/backend/searchbinary.py
@@ -1,8 +1,9 @@
#!/usr/bin/python3
-import sisyphus
-import sqlite3
import os
+import sisyphus.filesystem
+import sisyphus.update
+import sqlite3
def searchDB(filter, cat = '', pn = '', desc = ''):
NOVIRT = "AND cat NOT LIKE 'virtual'"
@@ -100,7 +101,7 @@ def searchDB(filter, cat = '', pn = '', desc = ''):
def tosql(string):
return '%%' if string == '' else string.replace('*', '%').replace('?', '_')
-def showSearch(filter, cat, pn, desc, single = False):
+def start(filter, cat, pn, desc, single = False):
if os.getuid() == 0:
sisyphus.update.start()
else:
diff --git a/src/backend/search.py b/src/backend/searchebuild.py
index c9b5862..c9b5862 100644
--- a/src/backend/search.py
+++ b/src/backend/searchebuild.py
diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py
index c5c6f25..33a2233 100755
--- a/src/frontend/cli/sisyphus-cli.py
+++ b/src/frontend/cli/sisyphus-cli.py
@@ -97,12 +97,12 @@ def search(package: List[str] = typer.Argument(...),
cat, pn = package[0].split('/')
else:
cat, pn = '', package[0]
- sisyphus.dbsearch.showSearch(filter.value, cat, pn, desc, quiet)
+ sisyphus.searchbinary.start(filter.value, cat, pn, desc, quiet)
else:
if not package:
raise typer.Exit('No search term provided, try: sisyphus search --help')
else:
- sisyphus.search.start(package)
+ sisyphus.searchebuild.start(package)
@app.command("install")
def install(pkgname: List[str], ebuild: bool = typer.Option(False, "--ebuild", "-e")):