Skip to content

opam update fails between 4ae3c774e4 and latest master: OpamSystem.Internal_patch_error("Patch \"in directory /home/edwint/.opam/repo/test\" does not apply cleanly.") #6937

@edwintorok

Description

@edwintorok

Steps to reproduce with opam 2.5.1 (narrowed down to a smaller commit range):

This works:

git clone https://github.com/ocaml/opam-repository && cd opam-repository
git checkout 142525538e5694742be38a5edaf7d3d6051acaf8
opam repo remove testbug --all
opam repo add testbug .
git checkout d9cabb4c55
opam update testbug

This fails:

git clone https://github.com/ocaml/opam-repository && cd opam-repository
git checkout '142525538e5694742be38a5edaf7d3d6051acaf8^'
opam repo remove testbug --all
opam repo add testbug .
git checkout d9cabb4c55
opam update testbug

Interestingly running opam update testbug again works then (but this doesn't help with the original issue I had).

Although updating directly from 142525538e5694742be38a5edaf7d3d6051acaf8^ to 142525538e5694742be38a5edaf7d3d6051acaf8 works too.

FWIW updating the default https remote works, it is just using a git remote that fails.

$ opam --version
2.5.1
$ git --version
git version 2.54.0
$ patch --version
GNU patch 2.8

Although it looks like opam processes the patch using an OCaml implementation of patch, so the bug might be there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions