[M5+] add resolver::verify_link + provisional overlay lifecycle
This commit is contained in:
@@ -71,6 +71,25 @@ auto overlay_insert_manual(OverlayState& state, const std::string& package,
|
||||
const cargoxx::linkdb::Recipe& r)
|
||||
-> cargoxx::util::Result<void>;
|
||||
|
||||
// Insert a row from a non-manual probe. `verified_at = 0` flags the row as
|
||||
// provisional; the verify-link step bumps it to the current epoch on
|
||||
// success or deletes the row on failure.
|
||||
auto overlay_insert_provisional(OverlayState& state, const std::string& package,
|
||||
const std::string& version_range,
|
||||
const cargoxx::linkdb::Recipe& r,
|
||||
const std::string& source)
|
||||
-> cargoxx::util::Result<void>;
|
||||
|
||||
auto overlay_confirm_provisional(OverlayState& state, const std::string& package,
|
||||
const std::string& version_range,
|
||||
const std::string& source)
|
||||
-> cargoxx::util::Result<void>;
|
||||
|
||||
auto overlay_delete_recipe(OverlayState& state, const std::string& package,
|
||||
const std::string& version_range,
|
||||
const std::string& source)
|
||||
-> cargoxx::util::Result<void>;
|
||||
|
||||
auto overlay_query(OverlayState& state, const std::string& package)
|
||||
-> cargoxx::util::Result<std::vector<OverlayRow>>;
|
||||
|
||||
@@ -92,6 +111,20 @@ class Database {
|
||||
auto add_manual(const std::string& package, const std::string& version_range,
|
||||
const Recipe& r) -> util::Result<void>;
|
||||
|
||||
// Provisional-recipe lifecycle, used by the resolver's verify-link step.
|
||||
// `source` should be one of "conan", "vcpkg", "nix-probe", or any other
|
||||
// probe identifier (NOT "manual"/"curated", which have their own
|
||||
// contracts).
|
||||
auto insert_provisional(const std::string& package,
|
||||
const std::string& version_range, const Recipe& r,
|
||||
const std::string& source) -> util::Result<void>;
|
||||
auto confirm_provisional(const std::string& package,
|
||||
const std::string& version_range,
|
||||
const std::string& source) -> util::Result<void>;
|
||||
auto abort_provisional(const std::string& package,
|
||||
const std::string& version_range,
|
||||
const std::string& source) -> util::Result<void>;
|
||||
|
||||
private:
|
||||
Database() = default;
|
||||
std::map<std::string, std::vector<detail::CuratedRecipe>> curated_;
|
||||
|
||||
Reference in New Issue
Block a user