lra / mackup

Keep your application settings in sync (OS X/Linux)
GNU General Public License v3.0
14.57k stars 933 forks source link

mackup got trouble dealing with quicklook plugins installed via homebrew-cask #719

Open ooxxcc opened 8 years ago

ooxxcc commented 8 years ago

I got multiple plugins installed via homebrew-cask, they were installed in /opt/homebrew-cask/Caskroom/ and soft linked in /Users/ooxx/Library/Quicklook/, mackup got trouble dealing with them.

$ mackup backup -f
Backing up Library/Quicklook ...
Traceback (most recent call last):
  File "/usr/local/Cellar/mackup/0.8.12/libexec/bin/mackup", line 9, in <module>
    load_entry_point('mackup==0.8.12', 'console_scripts', 'mackup')()
  File "/usr/local/Cellar/mackup/0.8.12/libexec/lib/python2.7/site-packages/mackup/main.py", line 90, in main
    app.backup()
  File "/usr/local/Cellar/mackup/0.8.12/libexec/lib/python2.7/site-packages/mackup/application.py", line 106, in backup
    utils.copy(home_filepath, mackup_filepath)
  File "/usr/local/Cellar/mackup/0.8.12/libexec/lib/python2.7/site-packages/mackup/utils.py", line 105, in copy
    shutil.copytree(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
    raise Error, errors
shutil.Error: [('/Users/ooxx/Library/Quicklook/QLColorCode.qlgenerator', '/Users/ooxx/Dropbox/Mackup/Library/Quicklook/QLColorCode.qlgenerator', "[Errno 2] No such file or directory: '/Users/ooxx/Library/Quicklook/QLColorCode.qlgenerator'"), ('/Users/ooxx/Library/Quicklook/QLStephen.qlgenerator', '/Users/ooxx/Dropbox/Mackup/Library/Quicklook/QLStephen.qlgenerator', "[Errno 2] No such file or directory: '/Users/ooxx/Library/Quicklook/QLStephen.qlgenerator'"), ('/Users/ooxx/Library/Quicklook/QuickLookCSV.qlgenerator', '/Users/ooxx/Dropbox/Mackup/Library/Quicklook/QuickLookCSV.qlgenerator', "[Errno 2] No such file or directory: '/Users/ooxx/Library/Quicklook/QuickLookCSV.qlgenerator'"), ('/Users/ooxx/Library/Quicklook/Suspicious Package.qlgenerator', '/Users/ooxx/Dropbox/Mackup/Library/Quicklook/Suspicious Package.qlgenerator', "[Errno 2] No such file or directory: '/Users/ooxx/Library/Quicklook/Suspicious Package.qlgenerator'"), ('/Users/ooxx/Library/Quicklook/WebP.qlgenerator', '/Users/ooxx/Dropbox/Mackup/Library/Quicklook/WebP.qlgenerator', "[Errno 2] No such file or directory: '/Users/ooxx/Library/Quicklook/WebP.qlgenerator'")]
$ ls -lah /Users/ooxx/Library/Quicklook/
total 72
drwxr-xr-x  11 ooxx  staff   374B 11 10 16:36 .
drwx------@ 76 ooxx  staff   2.5K 11 11 11:02 ..
lrwxr-xr-x   1 ooxx  staff    70B 11 10 16:03 BetterZipQL.qlgenerator -> /opt/homebrew-cask/Caskroom/betterzipql/latest/BetterZipQL.qlgenerator
lrwxr-xr-x   1 ooxx  staff    87B  9 14 16:03 QLColorCode.qlgenerator -> /opt/homebrew-cask/Caskroom/qlcolorcode/2.0.2/QLColorCode-2.0.2/QLColorCode.qlgenerator
lrwxr-xr-x   1 ooxx  staff    67B 11 10 16:36 QLMarkdown.qlgenerator -> /opt/homebrew-cask/Caskroom/qlmarkdown/1.3.3/QLMarkdown.qlgenerator
lrwxr-xr-x   1 ooxx  staff    71B 11 10 16:36 QLPrettyPatch.qlgenerator -> /opt/homebrew-cask/Caskroom/qlprettypatch/1.0/QLPrettyPatch.qlgenerator
lrwxr-xr-x   1 ooxx  staff    66B  8  7 00:56 QLStephen.qlgenerator -> /opt/homebrew-cask/Caskroom/qlstephen/latest/QLStephen.qlgenerator
lrwxr-xr-x   1 ooxx  staff    73B  5 16  2014 QuickLookCSV.qlgenerator -> /opt/homebrew-cask/Caskroom/quicklook-csv/latest/QuickLookCSV.qlgenerator
lrwxr-xr-x   1 ooxx  staff    75B 11 10 16:36 QuickLookJSON.qlgenerator -> /opt/homebrew-cask/Caskroom/quicklook-json/latest/QuickLookJSON.qlgenerator
lrwxr-xr-x   1 ooxx  staff    84B  5 16  2014 Suspicious Package.qlgenerator -> /opt/homebrew-cask/Caskroom/suspicious-package/latest/Suspicious Package.qlgenerator
lrwxr-xr-x   1 ooxx  staff    63B  5 16  2014 WebP.qlgenerator -> /opt/homebrew-cask/Caskroom/webp-quicklook/2.1/WebP.qlgenerator
openingnow commented 8 years ago

https://github.com/lra/mackup/issues/414 Maybe you can just deactivate mackup's ql backup.

I think when backing up ql, mackup should check whether the user uses brew cast to manage ql.

johan456789 commented 5 years ago

@openingnow How to deactivate ql backup? The doc says put the application name in .mackup.cfg but there's no app name for quicklook I guess?

openingnow commented 5 years ago

@johan456789 I added quicklook to .mackup.cfg and it works fine.