From 0ad870f3dc970e4cee8cafc47034abf973de4113 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 18 Mar 2021 20:26:37 -0400 Subject: [PATCH] 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. --- mesonbuild/minstall.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index 2a1883e16..e14a04704 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)