|
|
|
|
|
|
|
|
lm_name TEXT, |
|
|
lm_name TEXT, |
|
|
lm_namespace TEXT, |
|
|
lm_namespace TEXT, |
|
|
UNIQUE(name, version), |
|
|
UNIQUE(name, version), |
|
|
CONSTRAINT has_remote_info CHECK( |
|
|
|
|
|
|
|
|
CONSTRAINT has_source_info CHECK( |
|
|
( |
|
|
( |
|
|
git_url NOT NULL |
|
|
git_url NOT NULL |
|
|
AND git_ref NOT NULL |
|
|
AND git_ref NOT NULL |
|
|
) |
|
|
) |
|
|
|
|
|
= 1 |
|
|
), |
|
|
), |
|
|
CONSTRAINT valid_lm_info CHECK( |
|
|
CONSTRAINT valid_lm_info CHECK( |
|
|
( |
|
|
( |
|
|
|
|
|
|
|
|
git_remote_listing{ |
|
|
git_remote_listing{ |
|
|
*git_url, |
|
|
*git_url, |
|
|
*git_ref, |
|
|
*git_ref, |
|
|
lm_name ? std::make_optional(lm::usage{*lm_name, *lm_namespace}) : std::nullopt, |
|
|
|
|
|
|
|
|
lm_name ? std::make_optional(lm::usage{*lm_namespace, *lm_name}) : std::nullopt, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
std::vector<package_id> catalog::solve_requirements(const std::vector<dependency>& deps) const { |
|
|
|
|
|
return dds::solve(deps, |
|
|
|
|
|
[&](std::string_view pkg_name) { return this->by_name(pkg_name); }, |
|
|
|
|
|
[&](const package_id& pkg) { return this->dependencies_of(pkg); }); |
|
|
|
|
|
} |
|
|
|