From 10cc4f968f129d36ce6569258626c892dffbaeef Mon Sep 17 00:00:00 2001 From: gabry Date: Sat, 3 Jan 2026 10:29:20 +0100 Subject: [PATCH] build.py: uh slightly better depency stuff --- build.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.py b/build.py index a30bc3a..b26dd36 100644 --- a/build.py +++ b/build.py @@ -69,18 +69,29 @@ def fetch_manifest(pkgname, pkgver=None): def rebuild_package(packages, repo_dir=None): if isinstance(packages, str): packages = [packages] + + db = load_db() # <-- load db once + for pkg in packages: + if pkg not in db["installed"]: + print(f"[fempkg] Skipping rebuild of {pkg}: not installed.") + continue + print(f"[fempkg] Rebuilding dependency: {pkg}") + dep_recipe = None if repo_dir: dep_recipe = os.path.join(repo_dir, f"{pkg}.recipe.py") if not os.path.exists(dep_recipe): print(f"Warning: recipe for {pkg} not found in {repo_dir}.") dep_recipe = None + if not dep_recipe: dep_recipe = fetch_recipe(pkg) + build_package(dep_recipe, repo_dir, force_rebuild=True) + def extract_tar_zst_with_progress(tar_path, dest="/"): """ Extract a .tar.zst archive with a progress bar.