nix-bundle icon indicating copy to clipboard operation
nix-bundle copied to clipboard

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

Open jraygauthier opened this issue 3 years ago • 0 comments

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.

jraygauthier avatar Nov 16 '21 14:11 jraygauthier