From 0d8c1fafd9dd838506ba63daa6a3b3be21dd639f Mon Sep 17 00:00:00 2001 From: Jeff Olivier Date: Wed, 23 Aug 2023 13:14:51 -0600 Subject: [PATCH] DAOS-14216 build: Build fail if home is under /usr (#12907) The DAOS build will fail if a user builds prerequisites under /usr such as when the home directory is nested within. This patch simply changes the check for whether to patch rpath to continue if prereq is in the path for the binary in question. Signed-off-by: Jeff Olivier --- site_scons/prereq_tools/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site_scons/prereq_tools/base.py b/site_scons/prereq_tools/base.py index a42822ad083..9163bfb0ed7 100644 --- a/site_scons/prereq_tools/base.py +++ b/site_scons/prereq_tools/base.py @@ -1334,7 +1334,9 @@ def _patch_rpaths(self): rpath = ["$$ORIGIN"] norigin = [] comp_path = self.component_prefix - if not comp_path or comp_path.startswith("/usr"): + if not comp_path: + return + if comp_path.startswith('/usr') and '/prereq/' not in comp_path: return if not os.path.exists(comp_path): return