From 5d68312bd6973407ae7546ea73d91b4dc8c37741 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 16 Oct 2021 09:30:39 +0200 Subject: Skip regenerating .pc files during uninstall --- libbuild2/cc/pkgconfig.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libbuild2/cc/pkgconfig.cxx') diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx index f0dc5c4..151473d 100644 --- a/libbuild2/cc/pkgconfig.cxx +++ b/libbuild2/cc/pkgconfig.cxx @@ -1473,7 +1473,17 @@ namespace build2 const path& p (t->path ()); - // Note that generation can time some time if we have a large number of + // If we are uninstalling, skip regenerating the file if it already + // exists (I think we could have skipped this even if it doesn't exist, + // but let's keep things close to the install case). + // + if (ctx.current_action ().outer_operation () == uninstall_id) + { + if (exists (p)) + return; + } + + // Note that generation can take some time if we have a large number of // prerequisite libraries. // if (verb) -- cgit v1.1