git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 21, 2022, 21:38 UTC
Message-ID
<xmqq7d7if76u.fsf@gitster.g>
In-Reply-To
<CAPig+cTWj2Xf4sfMJBkzLhG5oUBS+Pb5-D-K50xMt9rP0doBRA@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> 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 ;-)

Show 7 quoted lines
> 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
 	}
 
Previous: Eric SunshineNext: Eric Sunshine
Message 7 of 21 in “CI: don't fail OSX tests due to brew v.s. perforce.com mis-match”
  1. 0/2 CI: don't fail OSX tests due to brew v.s. perforce.com mis-matchÆvar Arnfjörð Bjarmason, Apr 21, 2022
  2. 1/2 CI: run "brew install perforce" without past workaroundsÆvar Arnfjörð Bjarmason, Apr 21, 2022
  3. 2/2 CI: don't care about SHA256 mismatch on upstream "perforce" packageÆvar Arnfjörð Bjarmason, Apr 21, 2022
  4. Junio C HamanoApr 21, 2022
  5. Ævar Arnfjörð BjarmasonApr 21, 2022
  6. Eric SunshineApr 21, 2022
  7. Junio C HamanoApr 21, 2022
  8. Eric SunshineApr 21, 2022
  9. Junio C HamanoApr 21, 2022
  10. Ævar Arnfjörð BjarmasonApr 22, 2022
  11. Carlo Marcelo Arenas BelónApr 21, 2022
  12. Junio C HamanoApr 21, 2022
  13. Ævar Arnfjörð BjarmasonApr 22, 2022
  14. Junio C HamanoApr 21, 2022
  15. 0/3 CI: don't fail OSX tests due to brew v.s. perforce.com mis-matchÆvar Arnfjörð Bjarmason, Apr 22, 2022
  16. 3/3 CI: use https, not http to download binaries from perforce.comÆvar Arnfjörð Bjarmason, Apr 22, 2022
  17. 2/3 CI: don't care about SHA256 mismatch on upstream "perforce" packageÆvar Arnfjörð Bjarmason, Apr 22, 2022
  18. Carlo ArenasApr 22, 2022
  19. 1/3 CI: run "brew install perforce" without past workaroundsÆvar Arnfjörð Bjarmason, Apr 22, 2022
  20. Carlo ArenasApr 22, 2022
  21. Ævar Arnfjörð BjarmasonApr 22, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.