Fix installing Perforce in Docker.
Review Request #13897 — Created May 25, 2024 and submitted
The logic added to install Perforce in Docker didn't work correctly, for
a couple of reasons.First, we were basing our logic off of the build machine's architecture,
not the target architecture. When cross-building for X86 on ARM, we
wouldn't even try to install Perforce support at all. We needed to base
things off of$TARGETARCH
instead of$BUILDARCH
.That didn't even matter though, as we never declared we needed that
variable. So we skipped the Perforce support in all cases.And finally, even if that did work, we had the wrong command for
installing the p4 support. And we had some bash-isms that didn't work in
the shell used to execute these commands.We now declare and use
$TARGETARCH
for the comparisons, and properly
install thep4
binary andp4python
support whenever we're building
for X86.Note that we can't build for ARM, as
p4python
still hasn't been
released for ARM.
Built for both ARM and X86, and checked the resulting P4 support in
both. Verified that we had it installed properly in X86, and didn't
have any of it in ARM.
Summary | ID |
---|---|
b5f4d332a3de7dd46dae59b3966c14bfd5b5071d |
- Description:
-
The logic added to install Perforce in Docker didn't work correctly, for
a couple of reasons. First, we were basing our logic off of the build machine's architecture,
not the target architecture. When cross-building for X86 on ARM, we ~ wouldn't even try to install Perforce support at all. We needed to bae ~ wouldn't even try to install Perforce support at all. We needed to base things off of $TARGETARCH
instead of$BUILDARCH
.That didn't even matter though, as we never declared we needed that
variable. So we skipped the Perforce support in all cases. And finally, even if that did work, we had the wrong command for
installing the p4 support. And we had some bash-isms that didn't work in the shell used to execute these commands. We now declare and use
$TARGETARCH
for the comparisons, and properlyinstall the p4
binary andp4python
support whenever we're buildingfor X86. Note that we can't build for ARM, as
p4python
still hasn't beenreleased for ARM.