diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2021-03-03 12:47:28 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-03-06 13:29:29 +0200 |
commit | 6226ac26ef63335bfb817db02b3f295c78214a82 (patch) | |
tree | e280e355a8cc5871f83cbedac9bb0e615a375b04 | |
parent | fcbab5948c364b2be9ba0d23f0c1ed9523adc9bb (diff) | |
download | meson-6226ac26ef63335bfb817db02b3f295c78214a82.zip meson-6226ac26ef63335bfb817db02b3f295c78214a82.tar.gz meson-6226ac26ef63335bfb817db02b3f295c78214a82.tar.bz2 |
minstall: Correctly set uid/gid of installed files
In commit caab4d3d, the uid and gid arguments passed to os.chown() by
set_chown() were accidentally swapped, causing files to end up with
incorrect owner/group if the owner and group are not the same.
Also update the documentation to better indicate which argument to
install_mode is which.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
-rw-r--r-- | docs/markdown/Reference-manual.md | 2 | ||||
-rw-r--r-- | mesonbuild/minstall.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index 76c8f70..83eba89 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1065,7 +1065,7 @@ arguments. The following keyword arguments are supported: `install_mode: 'rw-r--r--'` for just the file mode - `install_mode: ['rw-r--r--', 'nobody', 'nobody']` for the file mode and the user/group + `install_mode: ['rw-r--r--', 'nobody', 'nogroup']` for the file mode and the user/group `install_mode: ['rw-r-----', 0, 0]` for the file mode and uid/gid diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 5713335..2a1883e 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -148,7 +148,7 @@ def set_chown(path: str, user: T.Optional[str] = None, group: T.Optional[str] = Use a real function rather than a lambda to help mypy out. Also real functions are faster. """ - real_os_chown(path, gid, uid, dir_fd=dir_fd, follow_symlinks=follow_symlinks) + real_os_chown(path, uid, gid, dir_fd=dir_fd, follow_symlinks=follow_symlinks) try: os.chown = chown |