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

Fix incorrect package installed state written on error #5922

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ users)
## Var/Option

## Update / Upgrade
* Failure when rebuilding a package owing to upstream changes no longer marks the package as successfully installed [#5922 @dra27]

## Tree

Expand Down
53 changes: 53 additions & 0 deletions tests/reftests/update-upgrade.test
Original file line number Diff line number Diff line change
Expand Up @@ -506,3 +506,56 @@ The following actions will be performed:
-> removed ongoing.dev
-> installed ongoing.dev
Done.
### <REPO/packages/d-foo/d-foo.6/opam>
opam-version: "2.0"
build: [ "false" ]
### opam update
[NOTE] ongoing.dev has previously been updated with --working-dir, not resetting unless explicitly selected

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[second] no changes from file://${BASEDIR}/REPO2
[default] synchronised from file://${BASEDIR}/REPO

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[quux.dev5] synchronised (no changes)
Now run 'opam upgrade' to apply any package updates.
### opam upgrade
The following actions will be performed:
=== recompile 1 package
- recompile d-foo 6 [upstream or system changes]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of d-foo.6 failed at "false".




<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build d-foo 6
+-
- No changes have been performed
# Return code 31 #
kit-ty-kate marked this conversation as resolved.
Show resolved Hide resolved
### : Removing the installed packages cache from the switch corrects the
### : behaviour - i.e. at present the packages are being marked as up-to-date
### : even though recompilation failed.
### rm OPAM/upgrading/.opam-switch/packages/cache
### : Running opam upgrade a second time should do the same thing - the same
### : failure with the same return code 31.
### opam upgrade
The following actions will be performed:
=== recompile 1 package
- recompile d-foo 6 [upstream or system changes]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of d-foo.6 failed at "false".




<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build d-foo 6
+-
- No changes have been performed
# Return code 31 #