-
Notifications
You must be signed in to change notification settings - Fork 6
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
Switching from a cargo-home
to flat
layout breaks updates
#210
Comments
I briefly started working on an updater patch, but first we need to patch the installer to fix the existing release. Here's the work-in-progress on the updater: main...zanieb:axoupdater:zb/layout I applied this patch to the installer locally to test: @@ -1021,6 +1021,16 @@
elif [ -n "$UNMANAGED_INSTALL" ]; then
_force_install_dir="$UNMANAGED_INSTALL"
_install_layout="flat"
+ fi
+
+ # Workaround for https://github.com/axodotdev/axoupdater/issues/210
+ # This was manually added to the installer post-release to patch the 0.4.30 -> 0.5.0 upgrade
+ if [ -n "${_force_install_dir:-}" ]; then
+ if [ "$_force_install_dir" = "${HOME:-}/.cargo" ] || [ "$_force_install_dir" = "${CARGO_HOME:-}" ]; then
+ _install_layout="cargo-home"
+ else
+ _install_layout="flat"
+ fi
fi
# Before actually consulting the configured install strategy, see Then patched the 0.5.0 artifact and tested a self-update
|
Next I'm testing a patch for the Windows installer @@ -281,6 +281,17 @@
$install_layout = "flat"
}
+ # Workaround for https://github.com/axodotdev/axoupdater/issues/210
+ # This was manually added to the installer post-release to patch the 0.4.30 ->
+ # 0.5.0 upgrade
+ if (($force_install_dir)) {
+ if ($force_install_dir.Replace('\\', '\') -eq (Join-Path $HOME ".cargo") -or $force_install_dir -eq $env:CARGO_HOME) {
+ $install_layout = "cargo-home"
+ } else {
+ $install_layout = "flat"
+ }
+ }
+
# The actual path we're going to install to
$dest_dir = $null
$dest_dir_lib = $null Similarly, this worked locally so I updated the release artifact. Notably |
I think we'll need every subsequent uv release to include these patches (or improved versions of them) since the updater for 0.4.30 will never read the |
Gets us the upstream fix (https://github.com/axodotdev/cargo-dist/pull/1538Z) for axodotdev/axoupdater#210 so we don't need to patch releases manually for self update to work. Includes a few other changes, i.e., they validate checksums now.
Note these patches are not robust, see axodotdev/cargo-dist#1538 and its follow-ups. The next |
Gets us the upstream fix (https://github.com/axodotdev/cargo-dist/pull/1538Z) for axodotdev/axoupdater#210 so we don't need to patch releases manually for self update to work. Includes a few other changes, i.e., they validate checksums now.
Needed to prevent updater failures when doing #13927 See - axodotdev/axoupdater#210 - axodotdev/cargo-dist#1538 - astral-sh/uv#8958
Needed to prevent updater failures when doing #13927 See - axodotdev/axoupdater#210 - axodotdev/cargo-dist#1538 - astral-sh/uv#8958
Needed to prevent updater failures when doing #13927 See - axodotdev/axoupdater#210 - axodotdev/cargo-dist#1538 - astral-sh/uv#8958
Needed to prevent updater failures when doing #13927 See - axodotdev/axoupdater#210 - axodotdev/cargo-dist#1538 - astral-sh/uv#8958
In uv 0.4.30, we used the default install path resulting in the following receipt:
In uv 0.5.0, we switched to a
flat
layout by specifying target install paths. However, this results in unexpected update behavior.uv self update
places the executables in~/.cargo
instead of~/.cargo/bin
. The previous version's executables are not removed. The receipt contains the new version so subsequent update attempts fail.This appears to be caused by not loading the
install_layout
from the receipt ataxoupdater/axoupdater/src/receipt.rs
Lines 69 to 71 in d45201f
The layout is not passed to the installer and it is hard-coded to
flat
: https://gist.github.com/zanieb/9dca39f62651087794bbb31fa377d72a#file-uv-installer-sh-L1018-L1020The update results in the receipt:
This may be related to #113
The text was updated successfully, but these errors were encountered: