mirror of https://github.com/microsoft/vcpkg.git
Remove PackageSpec.display_name()
This commit is contained in:
parent
285bbe0d8a
commit
18fa18a07b
|
|
@ -15,8 +15,6 @@ namespace vcpkg
|
|||
|
||||
const Triplet& target_triplet() const;
|
||||
|
||||
std::string display_name() const;
|
||||
|
||||
std::string dir() const;
|
||||
|
||||
std::string to_string() const;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace vcpkg
|
|||
|
||||
std::string BinaryParagraph::displayname() const
|
||||
{
|
||||
return this->spec.display_name();
|
||||
return this->spec.to_string();
|
||||
}
|
||||
|
||||
std::string BinaryParagraph::dir() const
|
||||
|
|
|
|||
|
|
@ -50,11 +50,6 @@ namespace vcpkg
|
|||
return this->m_target_triplet;
|
||||
}
|
||||
|
||||
std::string PackageSpec::display_name() const
|
||||
{
|
||||
return Strings::format("%s:%s", this->name(), this->target_triplet());
|
||||
}
|
||||
|
||||
std::string PackageSpec::dir() const
|
||||
{
|
||||
return Strings::format("%s_%s", this->m_name, this->m_target_triplet);
|
||||
|
|
@ -62,7 +57,7 @@ namespace vcpkg
|
|||
|
||||
std::string PackageSpec::to_string() const
|
||||
{
|
||||
return this->display_name();
|
||||
return Strings::format("%s:%s", this->name(), this->target_triplet());
|
||||
}
|
||||
|
||||
bool operator==(const PackageSpec& left, const PackageSpec& right)
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace vcpkg::Commands::Build
|
|||
}
|
||||
|
||||
const Expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(port_dir);
|
||||
Checks::check_exit(VCPKG_LINE_INFO, !maybe_spgh.error_code(), "Could not find package named %s: %s", spec.display_name(), maybe_spgh.error_code().message());
|
||||
Checks::check_exit(VCPKG_LINE_INFO, !maybe_spgh.error_code(), "Could not find package named %s: %s", spec, maybe_spgh.error_code().message());
|
||||
const SourceParagraph& spgh = *maybe_spgh.get();
|
||||
|
||||
StatusParagraphs status_db = database_load_check(paths);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace vcpkg::Commands::CI
|
|||
{
|
||||
const ElapsedTime build_timer = ElapsedTime::create_started();
|
||||
counter++;
|
||||
const std::string display_name = action.spec.display_name();
|
||||
const std::string display_name = action.spec.to_string();
|
||||
System::println("Starting package %d/%d: %s", counter, package_count, display_name);
|
||||
|
||||
timing.push_back(-1);
|
||||
|
|
@ -97,10 +97,10 @@ namespace vcpkg::Commands::CI
|
|||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec.display_name(), e.what());
|
||||
System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec, e.what());
|
||||
results.back() = BuildResult::NULLVALUE;
|
||||
}
|
||||
System::println("Elapsed time for package %s: %s", action.spec.display_name(), build_timer.to_string());
|
||||
System::println("Elapsed time for package %s: %s", action.spec, build_timer.to_string());
|
||||
}
|
||||
|
||||
System::println("Total time taken: %s", timer.to_string());
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ namespace vcpkg::Commands::Install
|
|||
const fs::path triplet_install_path = paths.installed / triplet.canonical_name();
|
||||
System::println(System::Color::error, "The following files are already installed in %s and are in conflict with %s",
|
||||
triplet_install_path.generic_string(),
|
||||
binary_paragraph.spec.display_name());
|
||||
binary_paragraph.spec);
|
||||
System::print("\n ");
|
||||
System::println(Strings::join("\n ", intersection));
|
||||
System::println("");
|
||||
|
|
@ -281,7 +281,7 @@ namespace vcpkg::Commands::Install
|
|||
// execute the plan
|
||||
for (const PackageSpecWithInstallPlan& action : install_plan)
|
||||
{
|
||||
const std::string display_name = action.spec.display_name();
|
||||
const std::string display_name = action.spec.to_string();
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -324,7 +324,7 @@ namespace vcpkg::Commands::Install
|
|||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec.display_name(), e.what());
|
||||
System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec, e.what());
|
||||
Checks::exit_fail(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ namespace vcpkg::Commands::Remove
|
|||
|
||||
for (const PackageSpecWithRemovePlan& action : remove_plan)
|
||||
{
|
||||
const std::string display_name = action.spec.display_name();
|
||||
const std::string display_name = action.spec.to_string();
|
||||
|
||||
switch (action.plan.plan_type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace vcpkg::Commands::Update
|
|||
System::println("The following packages differ from their port versions:");
|
||||
for (auto&& package : outdated_packages)
|
||||
{
|
||||
System::println(" %-32s %s", package.spec.display_name(), package.version_diff.to_string());
|
||||
System::println(" %-32s %s", package.spec, package.version_diff.to_string());
|
||||
}
|
||||
System::println("\n"
|
||||
"To update these packages, run\n"
|
||||
|
|
|
|||
Loading…
Reference in New Issue