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: copy-launchers activation script #181

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

nzbr
Copy link
Member

@nzbr nzbr commented Dec 14, 2022

Fixes #164

@nzbr nzbr added the bug Something isn't working label Dec 14, 2022
mkdir -p /usr/share/$x
${pkgs.rsync}/bin/rsync -ar --delete $systemConfig/sw/share/$x/. /usr/share/$x
else
rm -rf /usr/share/$x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this would help things or make them worse

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The directory doesn't exist at all on regular NixOS, that's why I altered the script to remove it. I don't know how Windows will react to that though (I mean, it works even if the directories don't exist, the start menu launchers just don't get created then). I haven't been able to find out how to make WSL re-scan for launchers, but in theory, it would be nice if we were able to make it do that as part of the activation script. Do you think leaving the directory in place and just deleting the files inside would be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we want to cleanup the directory we should clean it completely before or delete any file we do not know about. Right now we would miss files usually.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --delete option on the rsync command deletes everything in the target directory that doesn't exist at the source

@morphykuffour
Copy link

Does this fix issue #164? If so can it be merged into the main branch because I am having the same issue.

@nzbr
Copy link
Member Author

nzbr commented Dec 27, 2022

@morphykuffour I forgot to re-request review. I hope it'll be merged soon

@nzbr nzbr merged commit 79fa1eb into nix-community:main Dec 28, 2022
@nzbr nzbr deleted the fix-start-menu-launchers branch December 28, 2022 11:04
@nzbr nzbr changed the title Fix copy-launchers activation script fix: copy-launchers activation script Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rsync: [sender] change_dir failed
3 participants