mackup icon indicating copy to clipboard operation
mackup copied to clipboard

Add option --copy-only

Open dracorp opened this issue 10 months ago • 9 comments

All submissions

Adding/updating Application X Support

  • [x] This PR is only for one application
  • [x] It has been added to the list of supported applications in the README
  • [x] Changes have been added to the WIP section of the CHANGELOG
  • [x] Syncing does not break the application
  • [x] Syncing does not compete with any syncing functionality internal to the application
  • [x] The configuration syncs the minimal set of data
  • [x] No file specific to the local workstation is synced
  • [x] No sensitive data is synced

Improving the Mackup codebase

  • [x] My submission passes the tests
  • [x] I have linted the code locally prior to submission
  • [ ] I have written new tests as applicable
  • [x] I have added an explanation of what the changes do

dracorp avatar Apr 07 '24 19:04 dracorp

~~I find the name copy-only hard to understand. I had to look at the code changes to understand. I think preserve-source might be clearer.~~

Never mind, I changed my mind.

huyz avatar Apr 12 '24 10:04 huyz

I feel like this behavior should be the default. Unless I'm mistaken, the idea of symbolic links doesn't really work for many apps, e.g. Preferences file. As soon as an app rewrites the Preferences file, the symbolic link is broken.

I figure the default model should be copy/sync, possibly merge, but not symlinking, unless we can be assured that symlinks don't get deleted.

Am I understanding mackup right? I'm new to this app.

huyz avatar Apr 12 '24 11:04 huyz

Would it be possible to enable this per-application as well? I just realized that iStat Menus also breaks using the symlinks created by Mackup, and so it would nice to be able to modify a .cfg file with a flag to have it only copy files instead.

martimlobao avatar Apr 16 '24 10:04 martimlobao

I feel like this behavior should be the default. Unless I'm mistaken, the idea of symbolic links doesn't really work for many apps, e.g. Preferences file. As soon as an app rewrites the Preferences file, the symbolic link is broken.

I figure the default model should be copy/sync, possibly merge, but not symlinking, unless we can be assured that symlinks don't get deleted.

Am I understanding mackup right? I'm new to this app.

So, I've added a few apps to ignore, vim, iterm2 etc.

dracorp avatar Apr 16 '24 12:04 dracorp

Would it be possible to enable this per-application as well?

You mean make it part of the config file for each app? That sounds like a good idea.

huyz avatar Apr 16 '24 14:04 huyz

You mean make it part of the config file for each app? That sounds like a good idea.

Yeah, unless I'm reading it wrong, this PR currently only provides a CLI flag, so it's all or nothing. Having the granularity to configure which apps use the copy/paste method instead of symlinks will probably address a lot of the issues some apps appear to be having with symlinks.

martimlobao avatar Apr 16 '24 14:04 martimlobao

So, I've added a few apps to ignore, vim, iterm2 etc.

@dracorp What do you mean there? I don't see any changes in the code that would do what @martimlobao is asking for.

huyz avatar Apr 16 '24 14:04 huyz

@dracorp What do you mean there? I don't see any changes in the code that would do what @martimlobao is asking for. It's not up to me anymore. I only cared about copying.

So, I've added a few apps to ignore, vim, iterm2 etc. This is in my mackup configuration.

dracorp avatar Apr 16 '24 20:04 dracorp

IMO, the copy option should be by default, because right now Mackup is not working properly with a lot of apps :(. Maybe we can do that with a global flag in the config file if we don't want to modify the default behavior.

victor-falcon avatar Aug 10 '24 12:08 victor-falcon