Re: [PATCH 2/2] CI: don't care about SHA256 mismatch on upstream "perforce" package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:

> really isn't (the `-e` is being consumed by the `-i` option).

That makes sense.  So after all 4-year old random finding on the
internet had some value in pregventing a new breakage to sneak into
our codebase.  Good ;-)

> Any of
> the following would likely be less confusing (in no particular order
> of preference):
>
>     * sed -i .bak -e '...' "$path"
>     * rename dance
>     * perl -pi -e ...

That order happens to match my preference, but if the first one
comes with a comment to dissuade readers to copy-and-paste the
construct to other places in our code, that would be even better.

Perhaps something along this line.

 ci/install-dependencies.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git c/ci/install-dependencies.sh w/ci/install-dependencies.sh
index 540deab448..2a5ee34246 100755
--- c/ci/install-dependencies.sh
+++ w/ci/install-dependencies.sh
@@ -41,7 +41,12 @@ macos-latest)
 		echo Installing perforce failed, assuming and working around SHA256 mismatch >&2 &&
 
 		path=$(brew edit --print-path perforce) &&
-		sed -i -e 's/\(sha256.\).*/\1:no_check/' "$path" &&
+
+		# we do not do this unconditionally because we want
+		# to know that we are falling back.  Do not copy this
+		# use of 'sed -i .bak' elsewhere---it does not work with
+		# other implementations of "sed".
+		sed -i .bak -e 's/\(sha256.\).*/\1:no_check/' "$path" &&
 		brew install perforce
 	}
 



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux