aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-03-18 20:26:37 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-03-18 20:30:13 -0400
commit0ad870f3dc970e4cee8cafc47034abf973de4113 (patch)
tree840ef542bc7a3a13795978012c074ae928f16deb
parent3990754bf55727ef5593769b48f0a03c6b7a3671 (diff)
downloadmeson-0ad870f3dc970e4cee8cafc47034abf973de4113.zip
meson-0ad870f3dc970e4cee8cafc47034abf973de4113.tar.gz
meson-0ad870f3dc970e4cee8cafc47034abf973de4113.tar.bz2
minstall: always track meson-created directories
If a custom_target output is a directory, we install it as a directory, not as a file. And, we try to track subdirectories which are created so uninstalling works. But one directory creation did not go through DirMaker, in the case where the output directory does not have any further subdirectories. Consolidate on makedirs, since I don't see much point in using os.mkdir right here.
-rw-r--r--mesonbuild/minstall.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index 2a1883e..e14a047 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -292,10 +292,6 @@ class Installer:
# ['sub1', ...] means skip only those.
self.skip_subprojects = [i.strip() for i in options.skip_subprojects.split(',')]
- def mkdir(self, *args: T.Any, **kwargs: T.Any) -> None:
- if not self.dry_run:
- os.mkdir(*args, **kwargs)
-
def remove(self, *args: T.Any, **kwargs: T.Any) -> None:
if not self.dry_run:
os.remove(*args, **kwargs)
@@ -479,7 +475,7 @@ class Installer:
sys.exit(1)
parent_dir = os.path.dirname(abs_dst)
if not os.path.isdir(parent_dir):
- self.mkdir(parent_dir)
+ dm.makedirs(parent_dir)
self.copystat(os.path.dirname(abs_src), parent_dir)
# FIXME: what about symlinks?
self.do_copyfile(abs_src, abs_dst)