Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the dependencies graph code #173

Merged
merged 5 commits into from
Nov 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/vcpkg/packagespec.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace vcpkg
{
FeatureSpec(const PackageSpec& spec, const std::string& feature) : m_spec(spec), m_feature(feature) { }

const std::string& name() const { return m_spec.name(); }
const std::string& port() const { return m_spec.name(); }
const std::string& feature() const { return m_feature; }
Triplet triplet() const { return m_spec.triplet(); }

Expand All @@ -73,16 +73,16 @@ namespace vcpkg

bool operator<(const FeatureSpec& other) const
{
if (name() < other.name()) return true;
if (name() > other.name()) return false;
if (port() < other.port()) return true;
if (port() > other.port()) return false;
if (feature() < other.feature()) return true;
if (feature() > other.feature()) return false;
return triplet() < other.triplet();
}

bool operator==(const FeatureSpec& other) const
{
return triplet() == other.triplet() && name() == other.name() && feature() == other.feature();
return triplet() == other.triplet() && port() == other.port() && feature() == other.feature();
}

bool operator!=(const FeatureSpec& other) const { return !(*this == other); }
Expand Down
2 changes: 1 addition & 1 deletion include/vcpkg/statusparagraphs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace vcpkg
/// <summary>Find the StatusParagraph for given feature spec.</summary>
/// <param name="spec">Feature specification to find the status paragraph for</param>
/// <returns>Iterator for found spec</returns>
const_iterator find(const FeatureSpec& spec) const { return find(spec.name(), spec.triplet(), spec.feature()); }
const_iterator find(const FeatureSpec& spec) const { return find(spec.port(), spec.triplet(), spec.feature()); }

/// <summary>Find a StatusParagraph by name, triplet and feature.</summary>
/// <param name="name">Package name</param>
Expand Down
2 changes: 1 addition & 1 deletion src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ namespace vcpkg::Build
{
for (const FeatureSpec& fspec : kv.second)
{
if (!status_db.is_installed(fspec) && !(fspec.name() == name && fspec.triplet() == spec.triplet()))
if (!status_db.is_installed(fspec) && !(fspec.port() == name && fspec.triplet() == spec.triplet()))
{
missing_fspecs.emplace_back(fspec);
}
Expand Down
Loading