[M2] add SQLite overlay + add_manual
This commit is contained in:
13
CHANGELOG.md
13
CHANGELOG.md
@@ -57,3 +57,16 @@ All notable changes to cargoxx will be documented in this file.
|
||||
are deferred to the M2 follow-up commit.
|
||||
`tests/linkdb_lookup.cpp` covers 13 cases including a smoke test that
|
||||
resolves all 25 curated packages.
|
||||
- SQLite overlay: `Database::open(overlay_path)` now opens (and creates,
|
||||
if missing) a per-user `linkdb.sqlite` cache, applying the schema from
|
||||
`SPEC.md` §9 idempotently. Default path is
|
||||
`$XDG_CACHE_HOME/cargoxx/linkdb.sqlite` (falling back to
|
||||
`$HOME/.cache/cargoxx/...`); tests pass an explicit temp path so they
|
||||
never touch the user cache. `Database::add_manual(pkg, range, recipe)`
|
||||
inserts a row with `source = 'manual'` and `verified_at = now()`;
|
||||
`resolve()` consults the overlay first and falls back to curated when
|
||||
no overlay row matches the requested version range. Manual entries
|
||||
never expire; `nix-probe` (v0.2) entries respect a 30-day freshness
|
||||
window. `tests/linkdb_overlay.cpp` covers 7 cases (insert/persist,
|
||||
override-curated, version-range gating, components rejection,
|
||||
move semantics).
|
||||
|
||||
Reference in New Issue
Block a user