Fix installing Perforce in Docker.

Review Request #13897 — Created May 25, 2024 and submitted

Information

Review Board
release-6.x

Reviewers

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 the p4 binary and p4python 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
Fix installing Perforce in Docker.
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 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 the `p4` binary and `p4python` support whenever we're building for X86. Note that we can't build for ARM, as `p4python` still hasn't been released for ARM.
b5f4d332a3de7dd46dae59b3966c14bfd5b5071d
chipx86
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (a4c946a)
david
  1. Ship It!
  2.