From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Git List" <git@vger.kernel.org>,
"Derrick Stolee" <stolee@gmail.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>,
"Taylor Blau" <me@ttaylorr.com>,
"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 2/2] CI: don't care about SHA256 mismatch on upstream "perforce" package
Date: Thu, 21 Apr 2022 14:38:33 -0700 [thread overview]
Message-ID: <xmqq7d7if76u.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cTWj2Xf4sfMJBkzLhG5oUBS+Pb5-D-K50xMt9rP0doBRA@mail.gmail.com> (Eric Sunshine's message of "Thu, 21 Apr 2022 17:29:42 -0400")
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 ;-)
> 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
}
next prev parent reply other threads:[~2022-04-21 21:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 12:53 [PATCH 0/2] CI: don't fail OSX tests due to brew v.s. perforce.com mis-match Ævar Arnfjörð Bjarmason
2022-04-21 12:53 ` [PATCH 1/2] CI: run "brew install perforce" without past workarounds Ævar Arnfjörð Bjarmason
2022-04-21 12:53 ` [PATCH 2/2] CI: don't care about SHA256 mismatch on upstream "perforce" package Ævar Arnfjörð Bjarmason
2022-04-21 20:47 ` Junio C Hamano
2022-04-21 21:08 ` Ævar Arnfjörð Bjarmason
2022-04-21 21:29 ` Eric Sunshine
2022-04-21 21:38 ` Junio C Hamano [this message]
2022-04-21 21:48 ` Eric Sunshine
2022-04-21 22:41 ` Junio C Hamano
2022-04-22 9:22 ` Ævar Arnfjörð Bjarmason
2022-04-21 21:30 ` [PATCH 0/2] CI: don't fail OSX tests due to brew v.s. perforce.com mis-matchy Carlo Marcelo Arenas Belón
2022-04-21 21:39 ` Junio C Hamano
2022-04-22 9:21 ` Ævar Arnfjörð Bjarmason
2022-04-21 21:57 ` [PATCH 0/2] CI: don't fail OSX tests due to brew v.s. perforce.com mis-match Junio C Hamano
2022-04-22 9:07 ` [PATCH v2 0/3] " Ævar Arnfjörð Bjarmason
2022-04-22 9:07 ` [PATCH v2 1/3] CI: run "brew install perforce" without past workarounds Ævar Arnfjörð Bjarmason
2022-04-22 9:52 ` Carlo Arenas
2022-04-22 18:46 ` Ævar Arnfjörð Bjarmason
2022-04-22 9:07 ` [PATCH v2 2/3] CI: don't care about SHA256 mismatch on upstream "perforce" package Ævar Arnfjörð Bjarmason
2022-04-22 11:15 ` Carlo Arenas
2022-04-22 9:07 ` [PATCH v2 3/3] CI: use https, not http to download binaries from perforce.com Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7d7if76u.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=me@ttaylorr.com \
--cc=stolee@gmail.com \
--cc=sunshine@sunshineco.com \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.