Skip to content

[pkg] Read-only files cause caqti build to fail #12540

@maiste

Description

@maiste

Expected Behavior

Since #12519, Dune can't build caqti with Package management anymore. Previously, the code was building correctly. My bet is that the caqti build plan tries to override a file that already exists. However, as it is read-only, it doesn't work anymore.

Actual Behavior

It fails with the error:

File "dune.lock/caqti.pkg", line 7, characters 3-7:
7 |    dune
       ^^^^
Error: Logs for package caqti
Error: open(caqti.install): Permission denied

Reproduction

  1. Create the dune-project:
cat > dune-project <<EOF
(lang dune 3.20)
(package
  (name reproduce)
  (allow_empty)
  (depends ocaml caqti))
EOF
  1. Lock the package
dune pkg lock
  1. Build the dependencies to get the error:
DUNE_CONFIG__PKG_BUILD_PROGRESS=enabled dune build  @pkg-install

Specifications

  • Version of dune (output of dune --version): main
  • Version of ocaml (output of ocamlc --version): 5.3.0
  • Operating system (distribution and version): Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions