mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 18:32:47 +08:00
[vcpkg] Rename vcpkg_ports::find_available_x
to be more concise
This commit is contained in:
parent
f4196f1638
commit
76149ffac5
@ -11,8 +11,8 @@ namespace vcpkg
|
||||
{
|
||||
static expected<vcpkg_paths> create(const std::tr2::sys::path& vcpkg_root_dir);
|
||||
|
||||
fs::path find_available_package(const package_spec& spec) const;
|
||||
fs::path find_available_port_file(const package_spec& spec) const;
|
||||
fs::path package_dir(const package_spec& spec) const;
|
||||
fs::path port_dir(const package_spec& spec) const;
|
||||
|
||||
std::tr2::sys::path root;
|
||||
std::tr2::sys::path packages;
|
||||
|
@ -80,7 +80,7 @@ namespace vcpkg
|
||||
continue;
|
||||
}
|
||||
|
||||
fs::path package_path = paths.find_available_package(spec);
|
||||
fs::path package_path = paths.package_dir(spec);
|
||||
|
||||
expected<std::string> file_contents = Files::get_contents(package_path / "CONTROL");
|
||||
|
||||
|
@ -135,7 +135,7 @@ static std::string get_fullpkgname_from_listfile(const fs::path& path)
|
||||
|
||||
static fs::path prefix_path_for_package(const vcpkg_paths& paths, const BinaryParagraph& pgh)
|
||||
{
|
||||
return paths.find_available_package({pgh.name, pgh.target_triplet});
|
||||
return paths.package_dir({pgh.name, pgh.target_triplet});
|
||||
}
|
||||
|
||||
static void write_update(const vcpkg_paths& paths, const StatusParagraph& p)
|
||||
@ -213,7 +213,7 @@ static void install_and_write_listfile(const vcpkg_paths& paths, const BinaryPar
|
||||
std::vector<std::string> vcpkg::get_unmet_package_dependencies(const vcpkg_paths& paths, const package_spec& spec, const StatusParagraphs& status_db)
|
||||
{
|
||||
std::vector<std::unordered_map<std::string, std::string>> pghs;
|
||||
const fs::path packages_dir_control_file_path = paths.find_available_package(spec) / "CONTROL";
|
||||
const fs::path packages_dir_control_file_path = paths.package_dir(spec) / "CONTROL";
|
||||
|
||||
if (fs::exists(packages_dir_control_file_path))
|
||||
{
|
||||
@ -230,7 +230,7 @@ std::vector<std::string> vcpkg::get_unmet_package_dependencies(const vcpkg_paths
|
||||
return BinaryParagraph(pghs[0]).depends;
|
||||
}
|
||||
|
||||
const fs::path ports_dir_control_file_path = paths.find_available_port_file(spec) / "CONTROL";
|
||||
const fs::path ports_dir_control_file_path = paths.port_dir(spec) / "CONTROL";
|
||||
try
|
||||
{
|
||||
pghs = get_paragraphs(ports_dir_control_file_path);
|
||||
|
@ -47,12 +47,12 @@ namespace vcpkg
|
||||
return paths;
|
||||
}
|
||||
|
||||
fs::path vcpkg_paths::find_available_package(const package_spec& spec) const
|
||||
fs::path vcpkg_paths::package_dir(const package_spec& spec) const
|
||||
{
|
||||
return this->packages / Strings::format("%s_%s", spec.name, spec.target_triplet);
|
||||
return this->packages / spec.dir();
|
||||
}
|
||||
|
||||
fs::path vcpkg_paths::find_available_port_file(const package_spec& spec) const
|
||||
fs::path vcpkg_paths::port_dir(const package_spec& spec) const
|
||||
{
|
||||
return this->ports / spec.name;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user