feat: add index-aware recipe resolution with repo support
- fetch_recipe_from_repos() iterates repos by priority, channels, with
mirror fallback — caches indexes at /cache/indexes/
- Conditional HTTP downloads (curl -z) to only re-fetch stale indexes
- build_registry and fetch-package prefer repos { } over remotes = [...]
when both are present
- Fallback chain: local .kap → repos (index-aware) → remotes (legacy)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "kappa/dsl/system.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -13,7 +15,12 @@ struct RecipeResult {
|
||||
std::string error;
|
||||
};
|
||||
|
||||
// Legacy: flat URL list (backward compat with remotes = [...])
|
||||
RecipeResult fetch_recipe(const std::string& name,
|
||||
const std::vector<std::string>& remotes);
|
||||
|
||||
// Index-aware: named repos with channels, mirrors, and cached indexes
|
||||
RecipeResult fetch_recipe_from_repos(const std::string& name,
|
||||
const std::vector<dsl::RepoDef>& repos);
|
||||
|
||||
} // namespace kappa::fetch
|
||||
|
||||
Reference in New Issue
Block a user