aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg/install.cpp2
-rw-r--r--toolsrc/src/vcpkg/remove.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp
index 7a1ba4698..081063633 100644
--- a/toolsrc/src/vcpkg/install.cpp
+++ b/toolsrc/src/vcpkg/install.cpp
@@ -386,7 +386,7 @@ namespace vcpkg::Install
}
else if (const auto remove_action = action.remove_action.get())
{
- Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db);
+ Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, &status_db);
}
else
{
diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp
index 3815c3ce7..3eaf991ce 100644
--- a/toolsrc/src/vcpkg/remove.cpp
+++ b/toolsrc/src/vcpkg/remove.cpp
@@ -18,10 +18,10 @@ namespace vcpkg::Remove
using Dependencies::RequestType;
using Update::OutdatedPackage;
- void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, const StatusParagraphs& status_db)
+ void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db)
{
auto& fs = paths.get_filesystem();
- auto maybe_ipv = status_db.find_all_installed(spec);
+ auto maybe_ipv = status_db->find_all_installed(spec);
Checks::check_exit(
VCPKG_LINE_INFO, maybe_ipv.has_value(), "unable to remove package %s: already removed", spec);
@@ -106,6 +106,8 @@ namespace vcpkg::Remove
{
spgh.state = InstallState::NOT_INSTALLED;
write_update(paths, spgh);
+
+ status_db->insert(std::make_unique<StatusParagraph>(std::move(spgh)));
}
}
@@ -143,7 +145,7 @@ namespace vcpkg::Remove
void perform_remove_plan_action(const VcpkgPaths& paths,
const RemovePlanAction& action,
const Purge purge,
- const StatusParagraphs& status_db)
+ StatusParagraphs* status_db)
{
const std::string display_name = action.spec.to_string();
@@ -285,7 +287,7 @@ namespace vcpkg::Remove
for (const RemovePlanAction& action : remove_plan)
{
- perform_remove_plan_action(paths, action, purge, status_db);
+ perform_remove_plan_action(paths, action, purge, &status_db);
}
Checks::exit_success(VCPKG_LINE_INFO);