ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.25k stars 359 forks source link

opam 2.2.0~alpha2: Shared archive sources are not cached when checksum is missing #5638

Open psafont opened 1 year ago

psafont commented 1 year ago

From the description in https://github.com/ocaml/opam/pull/4893 it looks like now archives should be downloaded once and reused for compiling all the packages contained within, but I don't see that happening when using xapi's opam repository:

opam reinstall xapi-log
The following actions will be performed:
=== recompile 46 packages
  ↻ forkexec                 master [uses xapi-log]
  ↻ gzip                     master [uses xapi-compression]
  ↻ http-lib                 master [uses xapi-log]
  ↻ rrd-transport            master [uses xapi-idl]
  ↻ rrd2csv                  master [uses http-lib]
  ↻ rrdd-plugin              master [uses xapi-forkexecd]
  ↻ rrdd-plugins             master [uses rrdd-plugin]
  ↻ rrddump                  master [uses rrd-transport]
  ↻ stunnel                  master [uses xapi-log]
  ↻ varstored-guard          master [uses xapi-idl]
  ↻ vhd-tool                 master [uses xapi-log]
  ↻ xapi                     master [uses stunnel, xapi-datamodel]
  ↻ xapi-cli-protocol        master [uses xapi-datamodel]
  ↻ xapi-client              master [uses xapi-datamodel]
  ↻ xapi-clusterd            master [uses xapi-idl]
  ↻ xapi-clusterd-test       master [uses xapi-idl]
  ↻ xapi-compression         master [uses xapi-log]
  ↻ xapi-datamodel           master [uses xapi-schema]
  ↻ xapi-expiry-alerts       master [uses xapi-types]
  ↻ xapi-forkexecd           master [uses forkexec]
  ↻ xapi-idl                 master [uses xapi-open-uri]
  ↻ xapi-log                 master
  ↻ xapi-nbd                 master [uses xapi-tracing]
  ↻ xapi-networkd            master [uses forkexec]
  ↻ xapi-open-uri            master [uses stunnel]
  ↻ xapi-rrd-transport       master [uses rrd-transport]
  ↻ xapi-rrd-transport-utils master [uses xapi-rrd-transport]
  ↻ xapi-rrdd                master [uses http-lib, gzip]
  ↻ xapi-rrdd-plugin         master [uses rrdd-plugin]
  ↻ xapi-schema              master [uses xapi-log]
  ↻ xapi-squeezed            master [uses xapi-log]
  ↻ xapi-storage-cli         master [uses xapi-idl]
  ↻ xapi-storage-script      master [uses xapi-idl]
  ↻ xapi-tracing             master [uses xapi-log]
  ↻ xapi-types               master [uses xapi-datamodel]
  ↻ xapi-xenopsd             master [uses forkexec]
  ↻ xapi-xenopsd-cli         master [uses xapi-idl]
  ↻ xapi-xenopsd-simulator   master [uses xapi-xenopsd]
  ↻ xapi-xenopsd-xc          master [uses forkexec]
  ↻ xe                       master [uses stunnel, xapi-datamodel]
  ↻ xen-api-client           master [uses xapi-types]
  ↻ xen-api-client-async     master [uses xen-api-client]
  ↻ xen-api-client-lwt       master [uses xen-api-client]
  ↻ xen-api-sdk              master [uses xapi-datamodel]
  ↻ xs-toolstack             master [uses forkexec]
  ↻ zstd                     master [uses xapi-compression]

Proceed with ↻ 46 recompilations? [y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved http-lib.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved forkexec.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved gzip.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved rrd-transport.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved rrd2csv.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved rrdd-plugin.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved rrdd-plugins.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved rrddump.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved stunnel.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved varstored-guard.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved vhd-tool.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-cli-protocol.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-client.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-compression.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-datamodel.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-expiry-alerts.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-forkexecd.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-idl.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-log.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-nbd.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-networkd.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-open-uri.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-rrd-transport.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-rrd-transport-utils.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-rrdd.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-rrdd-plugin.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-schema.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-squeezed.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-storage-cli.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-storage-script.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-tracing.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-types.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-xenopsd.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-xenopsd-cli.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-xenopsd-simulator.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xapi-xenopsd-xc.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xe.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xen-api-client.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⬇ retrieved xen-api-client-async.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⊘ removed   xs-toolstack.master
⊘ removed   rrd2csv.master
⊘ removed   rrdd-plugins.master
⊘ removed   rrddump.master
⊘ removed   varstored-guard.master
⊘ removed   vhd-tool.master
⊘ removed   xapi.master
⊘ removed   xapi-clusterd.master
⊘ removed   xapi-clusterd-test.master
⊘ removed   xapi-expiry-alerts.master
⊘ removed   xapi-nbd.master
⊘ removed   xapi-networkd.master
⊘ removed   xapi-rrd-transport-utils.master
⊘ removed   xapi-rrdd.master
⊘ removed   gzip.master
⊘ removed   http-lib.master
⊘ removed   xapi-rrdd-plugin.master
⊘ removed   rrdd-plugin.master
⊘ removed   xapi-forkexecd.master
⊘ removed   xapi-rrd-transport.master
⊘ removed   rrd-transport.master
⊘ removed   xapi-squeezed.master
⊘ removed   xapi-storage-cli.master
⊘ removed   xapi-storage-script.master
⊘ removed   xapi-xenopsd-cli.master
⊘ removed   xapi-xenopsd-simulator.master
⊘ removed   xapi-xenopsd-xc.master
⊘ removed   xapi-xenopsd.master
⊘ removed   xe.master
⊘ removed   xapi-cli-protocol.master
⊘ removed   xen-api-client-async.master
⬇ retrieved xen-api-client-lwt.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⊘ removed   xen-api-client-lwt.master
⊘ removed   xen-api-client.master
⊘ removed   xapi-client.master
⊘ removed   xapi-types.master
⊘ removed   xapi-idl.master
⊘ removed   xapi-tracing.master
⊘ removed   xapi-open-uri.master
⊘ removed   stunnel.master
⬇ retrieved xen-api-sdk.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⊘ removed   xen-api-sdk.master
⊘ removed   xapi-datamodel.master
⊘ removed   xapi-schema.master
⬇ retrieved zstd.master  (https://github.com/xapi-project/xen-api/archive/master.tar.gz)
⊘ removed   zstd.master
⊘ removed   xapi-compression.master
⊘ removed   forkexec.master
⊘ removed   xapi-log.master
∗ installed xapi-log.master
∗ installed forkexec.master
∗ installed xapi-schema.master
∗ installed stunnel.master
∗ installed xapi-compression.master
∗ installed xapi-forkexecd.master
∗ installed xapi-open-uri.master
∗ installed xapi-datamodel.master
∗ installed gzip.master
∗ installed zstd.master
∗ installed xapi-tracing.master
∗ installed xapi-cli-protocol.master
∗ installed xen-api-sdk.master
∗ installed xe.master
∗ installed xapi-idl.master
∗ installed xapi-clusterd.master
∗ installed http-lib.master
∗ installed rrd-transport.master
∗ installed xapi-rrd-transport.master
∗ installed vhd-tool.master
∗ installed xapi-storage-cli.master
∗ installed xapi-storage-script.master
∗ installed xapi-types.master
∗ installed xapi-xenopsd-cli.master
∗ installed rrddump.master
∗ installed rrdd-plugin.master
∗ installed xapi-rrdd-plugin.master
∗ installed xapi-rrd-transport-utils.master
∗ installed xapi-rrdd.master
∗ installed xapi-squeezed.master
∗ installed xapi-xenopsd.master
∗ installed rrdd-plugins.master
∗ installed xapi-xenopsd-simulator.master
∗ installed xapi-client.master
∗ installed xapi-xenopsd-xc.master
∗ installed rrd2csv.master
∗ installed xapi-expiry-alerts.master
∗ installed xen-api-client.master
∗ installed xapi-networkd.master
∗ installed xen-api-client-async.master
∗ installed xen-api-client-lwt.master
∗ installed xapi-clusterd-test.master
∗ installed varstored-guard.master
∗ installed xapi-nbd.master
∗ installed xapi.master
∗ installed xs-toolstack.master
Done.

Is this happening because packages without checksums are forbidden from ever being cached?

kit-ty-kate commented 1 year ago

Is this happening because packages without checksums are forbidden from ever being cached?

Yes. The same inconsistent behaviour also happen when you pin a git repository with several packages.

It's possible to fix but isn't trivial to do so it probably won't happen before the final release of opam 2.2.0, but contributions are welcome as always if you happen to have the time.