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
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 21, 2022, 21:29 UTC
Message-ID
<CAPig+cTWj2Xf4sfMJBkzLhG5oUBS+Pb5-D-K50xMt9rP0doBRA@mail.gmail.com>
In-Reply-To
<220421.86pmla5eja.gmgdl@evledraar.gmail.com>

On Thu, Apr 21, 2022 at 5:10 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 16 quoted lines
> On Thu, Apr 21 2022, Junio C Hamano wrote:
> > Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
> >> +            sed -i -e 's/\(sha256.\).*/\1:no_check/' "$path" &&
> >
> > "sed -i" is not POSIX and without macOS box I do not know if it
> > works there.  FreeBSD sed manual seems to indicate they have
> >
> >       sed -i <extension>
> >
> > Ah, no, I'd say we should NOT use "sed -i" here, not in the form in
> > this patch, after seeing
> >   https://unix.stackexchange.com/questions/401905/bsd-sed-vs-gnu-sed-and-i
> > but that is 4-year old information, so...
>
> It works on the OSX we use now:
> https://github.com/avar/git/runs/6092916612?check_suite_focus=true

On my end-of-life'd 10.13 macOS, `sed` (which is the FreeBSD version) requires an argument after `-i`, thus it's taking `-e` as the extension name for the backup file, and then uses the raw 's/\(sha256.\).*/\1:no_check/' as the `sed` command. So, it's working, but only by accident since `-e` is optional when invoking `sed`.

> I think it's fine to keep it, but we could also use "perl -pi -e" here,
> or a rename dance...

Although it's working (by accident), it's rather misleading since it looks like `-e` is introducing the `sed` command, even though it really isn't (the `-e` is being consumed by the `-i` option). 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 ...
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 6 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.