Remove pacman delegation and fix minor issues with database logic
This commit is contained in:
@@ -4,11 +4,11 @@ import os
|
|||||||
|
|
||||||
from config import load_config, CONFIG_FILE, get_repos
|
from config import load_config, CONFIG_FILE, get_repos
|
||||||
|
|
||||||
DB_PATH = os.path.expanduser(load_config()["db_path"])
|
DB_PATH = os.path.expanduser(load_config()["db_path"] / "sync")
|
||||||
|
|
||||||
def get_package_meta(pkgname: str) -> dict | None:
|
def get_package_meta(pkgname: str) -> dict | None:
|
||||||
for dbfile in os.listdir(DB_PATH):
|
for dbfile in os.listdir(DB_PATH):
|
||||||
if not dbfile.endwith(".db"):
|
if not dbfile.endswith(".db"):
|
||||||
continue
|
continue
|
||||||
meta = _search_db(os.path.join(DB_PATH, dbfile), pkgname)
|
meta = _search_db(os.path.join(DB_PATH, dbfile), pkgname)
|
||||||
if meta:
|
if meta:
|
||||||
|
|||||||
@@ -26,11 +26,6 @@ def install(pkgname: str):
|
|||||||
print(f"error: package '{pkgname}' not found is userman db")
|
print(f"error: package '{pkgname}' not found is userman db")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if meta.get("install_mode", "system") != "user":
|
|
||||||
print(f":: Handing off '{pkgname}' to pacman")
|
|
||||||
delegate_to_pacman(pkgname)
|
|
||||||
return
|
|
||||||
|
|
||||||
pkg_path, sig_path = fetch_package(meta)
|
pkg_path, sig_path = fetch_package(meta)
|
||||||
|
|
||||||
if not verify_sig(pkg_path, sig_path):
|
if not verify_sig(pkg_path, sig_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user