From 7884149bf55dfef1fc77f404b8dbb08cd12e0908 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 7 Feb 2023 20:52:57 -0500 Subject: minstall: when elevating to root, don't allow ninja to rerun We just finished running rebuild_all, and then actually running the install routine failed because of permission errors, so we magically reran as root. But we should *know* that all prerequisite targets are up to date already, we don't need to run it *again*. Nevertheless, when running meson install directly we could end up without --no-rebuild in the original argv. This meant that it wouldn't be in the re-executed argv either. Add it on just in case -- repeating it twice doesn't hurt anyway. --- mesonbuild/minstall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/minstall.py') diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 40c2d2d..9ba36cb 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -560,7 +560,7 @@ class Installer: print('Installation failed due to insufficient permissions.') print('Attempting to use polkit to gain elevated privileges...') os.execlp('pkexec', 'pkexec', sys.executable, main_file, *sys.argv[1:], - '-C', os.getcwd()) + '-C', os.getcwd(), '--no-rebuild') else: raise -- cgit v1.1