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

Bundle unpacking to cache is not atomic and may lead to a corrupted cache #85

Open
jraygauthier opened this issue Nov 16, 2021 · 0 comments

Comments

@jraygauthier
Copy link

Workaround was to provide client with a desktop shortcut to clear the cache in case it occurs again:

[Desktop Entry]
Version=1.0
Type=Application
Name=Nix-Bundle Clear Cache
Comment=Clear the nix-bundle cache in case corrupted.
Exec=sudo bash -c 'echo "Removing nix-bundle cache under /tmp."; sudo rm -rf /tmp/tmpx-* && sudo rm -rf /tmp/nix*; echo "Hit any key to exit."; read'
Icon=utilities-terminal
Terminal=true
StartupNotify=false
Name[en_US]=nix-bundle-clear-cache.desktop

I also note that when cache ends under /tmp which is the case in my client's context (ubuntu of some version), cache path is the same for all users which is not very good if you run the same command both under sudo and not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant