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

Re: [PATCH] ci: run "apt-get update" before "apt-get install"

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 26, 2021, 22:12 UTC
Message-ID
<xmqqczr4hghl.fsf@gitster.g>
In-Reply-To
<YP72o/1Yg02BcDXw@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> On Wed, Jul 14, 2021 at 11:50:33AM +0000, Johannes Schindelin via GitGitGadget wrote:
>
>> +    - name: Install other dependencies
>> +      run: |
>> +        sudo apt-get install -q -y libssl-dev libcurl4-openssl-dev libexpat-dev gettext zlib1g-dev
>
> My CI runs based on 'next' started failing today. I think we'd want this
> on top (of js/ci-make-sparse):
Makes sense.
Show 39 quoted lines
> -- >8 --
> Subject: [PATCH] ci: run "apt-get update" before "apt-get install"
>
> The "sparse" workflow runs "apt-get install" to pick up a few necessary
> packages. But it needs to run "apt-get update" first, or it risks trying
> to download an old package version that no longer exists. And in fact
> this happens now, with output like:
>
>   2021-07-26T17:40:51.2551880Z E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl4-openssl-dev_7.68.0-1ubuntu2.5_amd64.deb  404  Not Found [IP: 52.147.219.192 80]
>   2021-07-26T17:40:51.2554304Z E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
>
> Our other ci jobs don't suffer from this; they rely on scripts in ci/,
> and ci/install-dependencies does the appropriate "apt-get update".
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> I guess this package setup could also be moved into ci/install-dependencies.sh,
> but I don't think it really buys anything (the "apt-get update" line
> would not even be shared, because the outermost layer is a big switch
> statement on the jobname). OTOH, it looks like other one-off jobs are in
> there (e.g., StaticAnalysis).
>
> Anyway, this is the minimal fixup.
>
>  .github/workflows/main.yml | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
> index 1b5c039207..01878884ae 100644
> --- a/.github/workflows/main.yml
> +++ b/.github/workflows/main.yml
> @@ -368,6 +368,7 @@ jobs:
>        run: sudo dpkg -i sparse-20.04/sparse_*.deb
>      - name: Install other dependencies
>        run: |
> +        sudo apt-get update -q &&
>          sudo apt-get install -q -y libssl-dev libcurl4-openssl-dev libexpat-dev gettext zlib1g-dev
>      - uses: actions/checkout@v2
>      - run: make sparse
Previous: Jeff KingNext: Johannes Schindelin via GitGitGadget
Message 20 of 22 in “ci: run `make sparse` as a GitHub workflow”
  1. ci: run `make sparse` as a GitHub workflowJohannes Schindelin via GitGitGadget, Jul 13, 2021
  2. Đoàn Trần Công DanhJul 13, 2021
  3. Johannes SchindelinJul 14, 2021
  4. Philippe BlainJul 13, 2021
  5. Johannes SchindelinJul 14, 2021
  6. Johannes SchindelinJul 14, 2021
  7. Ramsay JonesJul 16, 2021
  8. Junio C HamanoJul 13, 2021
  9. Johannes SchindelinJul 14, 2021
  10. Junio C HamanoJul 14, 2021
  11. Johannes SchindelinJul 14, 2021
  12. Junio C HamanoJul 14, 2021
  13. Johannes SchindelinJul 14, 2021
  14. Junio C HamanoJul 14, 2021
  15. Johannes SchindelinJul 16, 2021
  16. Junio C HamanoJul 16, 2021
  17. ci: run `make sparse` as part of the GitHub workflowJohannes Schindelin via GitGitGadget, Jul 14, 2021
  18. ci: run "apt-get update" before "apt-get install"Jeff King, Jul 26, 2021
  19. Jeff KingJul 26, 2021
  20. Junio C HamanoJul 26, 2021
  21. ci: run `make sparse` as part of the GitHub workflowJohannes Schindelin via GitGitGadget, Jul 26, 2021
  22. Junio C HamanoJul 26, 2021

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.