aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/BinaryParagraph.cpp
diff options
context:
space:
mode:
authorjasjuang <jasjuang@gmail.com>2017-09-22 08:16:32 -0700
committerjasjuang <jasjuang@gmail.com>2017-09-22 08:16:32 -0700
commitf643a8422f87c5a16e3cc77e3e321e34a45f7103 (patch)
tree419c9a2e74ab577aab0e868441b9a0e4c15d4919 /toolsrc/src/BinaryParagraph.cpp
parent9989177fed607cdc9e20127ff7c22e3266e7c913 (diff)
parentfac96eb344a500405ab65b7e7f3755af0ad00b7e (diff)
downloadvcpkg-f643a8422f87c5a16e3cc77e3e321e34a45f7103.tar.gz
vcpkg-f643a8422f87c5a16e3cc77e3e321e34a45f7103.zip
Merge branch 'master' of https://github.com/jasjuang/vcpkg
Diffstat (limited to 'toolsrc/src/BinaryParagraph.cpp')
-rw-r--r--toolsrc/src/BinaryParagraph.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/toolsrc/src/BinaryParagraph.cpp b/toolsrc/src/BinaryParagraph.cpp
index 49e9d58e5..1504912ab 100644
--- a/toolsrc/src/BinaryParagraph.cpp
+++ b/toolsrc/src/BinaryParagraph.cpp
@@ -56,7 +56,7 @@ namespace vcpkg
this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES));
}
- if (auto err = parser.error_info(this->spec.to_string()))
+ if (const auto err = parser.error_info(this->spec.to_string()))
{
System::println(
System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string());
@@ -80,14 +80,18 @@ namespace vcpkg
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet)
{
this->spec = PackageSpec::from_name_and_triplet(spgh.name, triplet).value_or_exit(VCPKG_LINE_INFO);
- this->version = "";
+ this->version = Strings::EMPTY;
this->feature = fpgh.name;
this->description = fpgh.description;
- this->maintainer = "";
+ this->maintainer = Strings::EMPTY;
this->depends = filter_dependencies(fpgh.depends, triplet);
}
- std::string BinaryParagraph::displayname() const { return this->spec.to_string(); }
+ std::string BinaryParagraph::displayname() const
+ {
+ const auto f = this->feature.empty() ? "core" : this->feature;
+ return Strings::format("%s[%s]:%s", this->spec.name(), f, this->spec.triplet());
+ }
std::string BinaryParagraph::dir() const { return this->spec.dir(); }