From c95c183bc4533fe36eac7b30f9b453836e93d107 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 24 Jul 2020 15:32:18 +0200 Subject: [PATCH] openfoam: install META-INFO directory (#17673) Co-authored-by: Mark Olesen --- .../repos/builtin/packages/openfoam-org/package.py | 12 +++++++----- var/spack/repos/builtin/packages/openfoam/package.py | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/openfoam-org/package.py b/var/spack/repos/builtin/packages/openfoam-org/package.py index dc9b5673ee9..e2859dc838e 100644 --- a/var/spack/repos/builtin/packages/openfoam-org/package.py +++ b/var/spack/repos/builtin/packages/openfoam-org/package.py @@ -332,15 +332,17 @@ def install(self, spec, prefix): # Having wmake and ~source is actually somewhat pointless... # Install 'etc' before 'bin' (for symlinks) - dirs = ['etc', 'bin', 'wmake'] + # META-INFO for 1812 and later (or backported) + dirs = ['META-INFO', 'etc', 'bin', 'wmake'] if '+source' in spec: dirs.extend(['applications', 'src', 'tutorials']) for d in dirs: - install_tree( - d, - join_path(self.projectdir, d), - symlinks=True) + if os.path.isdir(d): + install_tree( + d, + join_path(self.projectdir, d), + symlinks=True) dirs = ['platforms'] if '+source' in spec: diff --git a/var/spack/repos/builtin/packages/openfoam/package.py b/var/spack/repos/builtin/packages/openfoam/package.py index d347c61cfa9..3b9ff8a7dd4 100644 --- a/var/spack/repos/builtin/packages/openfoam/package.py +++ b/var/spack/repos/builtin/packages/openfoam/package.py @@ -773,15 +773,17 @@ def install(self, spec, prefix): # Having wmake and ~source is actually somewhat pointless... # Install 'etc' before 'bin' (for symlinks) - dirs = ['etc', 'bin', 'wmake'] + # META-INFO for 1812 and later (or backported) + dirs = ['META-INFO', 'etc', 'bin', 'wmake'] if '+source' in spec: dirs.extend(['applications', 'src', 'tutorials']) for d in dirs: - install_tree( - d, - join_path(self.projectdir, d), - symlinks=True) + if os.path.isdir(d): + install_tree( + d, + join_path(self.projectdir, d), + symlinks=True) dirs = ['platforms'] if '+source' in spec: