Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pin: no op when local vcs directory does not contain opam file #5445

Open
rjbou opened this issue Feb 15, 2023 · 0 comments
Open

pin: no op when local vcs directory does not contain opam file #5445

rjbou opened this issue Feb 15, 2023 · 0 comments

Comments

@rjbou
Copy link
Collaborator

rjbou commented Feb 15, 2023

opam file is retrieved from local directory even if it is vcs url, not from the branch specified in the given url.

### mkdir pin-empty
### git -C pin-empty init -q --initial-branch=master
### git -C pin-empty config core.autocrlf false
### opam pin --no-action ./pin-empty
### <pin-empty/file>
content
### git -C pin-empty add -A
### git -C pin-empty commit -qm "init"
### git -C pin-empty branch another
### <pin:pin-empty/opam>
opam-version: "2.0"
### git -C pin-empty add -A
### git -C pin-empty commit -qm 'opam'
### git -C pin-empty checkout another
Switched to branch 'another'
### ls pin-empty
file
### OPAMDEBUG=-1
### opam pin --no-action ./pin-empty
CLI                             Parsing CLI version 2.2
GSTATE                          LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM
RSTATE                          LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM
CACHE(repository)               Loaded ${BASEDIR}/OPAM/repo/state-003ACE73.cache in 0.000s
RSTATE                          Cache found
STATE                           LOAD-SWITCH-STATE @ pinning
CACHE(installed)                Loaded ${BASEDIR}/OPAM/pinning/.opam-switch/packages/cache in 0.000s
STATE                           Inferred invariant: from base packages {}, (roots {}) => []
FILE(switch-config)             Wrote ${BASEDIR}/OPAM/pinning/.opam-switch/switch-config in 0.000s
STATE                           Switch state loaded in 0.000s
FILE(switch-state)              Wrote ${BASEDIR}/OPAM/pinning/.opam-switch/backup/state-20230215111756.export in 0.000s
PARALLEL                        Iterate over 0 task(s) with 1 process(es)
SYSTEM                          rm ${BASEDIR}/OPAM/pinning/.opam-switch/backup/state-20230215111756.export
### opam pin --no-action ./pin-empty#inexistant
CLI                             Parsing CLI version 2.2
GSTATE                          LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM
RSTATE                          LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM
CACHE(repository)               Loaded ${BASEDIR}/OPAM/repo/state-003ACE73.cache in 0.000s
RSTATE                          Cache found
STATE                           LOAD-SWITCH-STATE @ pinning
CACHE(installed)                Loaded ${BASEDIR}/OPAM/pinning/.opam-switch/packages/cache in 0.000s
STATE                           Inferred invariant: from base packages {}, (roots {}) => []
FILE(switch-config)             Wrote ${BASEDIR}/OPAM/pinning/.opam-switch/switch-config in 0.000s
STATE                           Switch state loaded in 0.000s
FILE(switch-state)              Wrote ${BASEDIR}/OPAM/pinning/.opam-switch/backup/state-20230215111756.export in 0.000s
PARALLEL                        Iterate over 0 task(s) with 1 process(es)
SYSTEM                          rm ${BASEDIR}/OPAM/pinning/.opam-switch/backup/state-20230215111756.export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant