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.
pull/11366/head
Eli Schwartz 2 years ago
parent 088727164d
commit 7884149bf5
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      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

Loading…
Cancel
Save