Skip to content

Commit 7d9faf3

Browse files
gregshpitmarvell
and
marvell
authored
Added support for Sonic cross-compilation build. (sonic-net#2233)
Signed-off-by: marvell <[email protected]> Co-authored-by: marvell <[email protected]>
1 parent c3620fc commit 7d9faf3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utilities_common/auto_techsupport_helper.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272

7373
# Explicity Pass this to the subprocess invoking techsupport
7474
ENV_VAR = os.environ
75-
PATH_PREV = ENV_VAR["PATH"] if "PATH" in ENV_VAR else ""
76-
ENV_VAR["PATH"] = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:" + PATH_PREV
75+
if ('CROSS_BUILD_ENVIRON' not in ENV_VAR) or (ENV_VAR['CROSS_BUILD_ENVIRON'] != 'y'):
76+
# Add native system directories to PATH variable only if it is not cross-compilation build
77+
PATH_PREV = ENV_VAR["PATH"] if "PATH" in ENV_VAR else ""
78+
ENV_VAR["PATH"] = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:" + PATH_PREV
7779

7880
# Techsupport Exit Codes
7981
EXT_LOCKFAIL = 2

0 commit comments

Comments
 (0)