enable fetch and gclient to run on z/OS part 1

See https://issues.chromium.org/issues/323790693#comment12 for the manual steps still required.

R=gavinmak@google.com

Bug: 323790693
Change-Id: Id0ac2d8a6027cbb5e0554574471c160d5fae807c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5277474
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/74/5277474/10
Gaby Baghdadi 1 year ago committed by LUCI CQ
parent 7b4fb3d22d
commit 9d64acedea

@ -6,6 +6,12 @@
set -e -o pipefail
# Run custom-built cipd client. This is useful when cipd is not available upstream
# (i.e. unsupported platform).
if [ ! -z "${CUSTOM_CIPD_CLIENT}" ]; then
exec "${CUSTOM_CIPD_CLIENT}" "${@}"
fi
# Export for other depot_tools scripts to re-use.
export DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$(dirname "${BASH_SOURCE[0]}")}"
export DEPOT_TOOLS_UNAME_S="${DEPOT_TOOLS_UNAME_S:-$(uname -s | tr '[:upper:]' '[:lower:]')}"

@ -34,6 +34,8 @@ def HostArch():
host_arch = 's390'
elif host_arch.startswith('riscv'):
host_arch = 'riscv64'
elif platform.system() == 'OS/390':
host_arch = 's390x'
if host_arch == 'arm64':
host_platform = platform.architecture()

@ -35,6 +35,7 @@ PLATFORM_MAPPING = {
'win32': 'win',
'aix6': 'aix',
'aix7': 'aix',
'zos': 'zos',
}

@ -1536,6 +1536,7 @@ _PLATFORM_MAPPING = {
'linux': 'linux',
'win32': 'win',
'aix6': 'aix',
'zos': 'zos',
}
@ -1624,6 +1625,7 @@ class GClient(GitDependency):
"ios": "ios",
"fuchsia": "fuchsia",
"chromeos": "chromeos",
"zos": "zos",
}
DEFAULT_CLIENT_FILE_TEXT = ("""\

@ -632,7 +632,7 @@ def CheckCallAndFilter(args,
# subprocess when filtering its output. This makes the subproc believe
# it was launched from a terminal, which will preserve ANSI color codes.
os_type = GetOperatingSystem()
if sys.stdout.isatty() and os_type != 'win' and os_type != 'aix':
if sys.stdout.isatty() and os_type not in ['win', 'aix', 'zos']:
pipe_reader, pipe_writer = os.openpty()
else:
pipe_reader, pipe_writer = os.pipe()

@ -37,7 +37,7 @@ LUCI_AUTH_SCOPES = [
# Platforms unsupported by luci-auth.
LUCI_AUTH_UNSUPPORTED_PLATFORMS = ['aix']
LUCI_AUTH_UNSUPPORTED_PLATFORMS = ['aix', 'zos']
class InvalidGsutilError(Exception):

Loading…
Cancel
Save