From 34ea73940e0bebb9c166856dbcebafd14b7348dc Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Thu, 2 Jan 2020 20:21:18 +0100 Subject: [PATCH] Go one directory up looking for releasetools path Change I366099c3dfd5fa4282745ef258a8cf35338e1e42 introduced a more restricted search where we only look in out/host/x/bin instead of out/host/x when looking for files. Because signapk is in out/host/x/framework, and lib64 is in out/host/x, we need to go one level up for this to work properly. Fix: 147096688 Test: atest --host releasetools_test releasetools_py3_test Change-Id: I597e1d95c09eb0e27b2faebb107218761901d9ac --- tools/releasetools/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 556d25a8c8..54ee7cf918 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -62,7 +62,7 @@ class Options(object): 'Warning: releasetools script should be invoked as hermetic Python ' 'executable -- build and run `{}` directly.'.format(script_name[:-3]), file=sys.stderr) - self.search_path = os.path.realpath(os.path.join(exec_path, '..')) + self.search_path = os.path.realpath(os.path.join(os.path.dirname(exec_path), '..')) self.signapk_path = "framework/signapk.jar" # Relative to search_path self.signapk_shared_library_path = "lib64" # Relative to search_path