mackup icon indicating copy to clipboard operation
mackup copied to clipboard

espanso broken after upgrade to 0.8.35

Open jaklan opened this issue 3 years ago • 7 comments

mackup started to fail due to espanso.sock and worker.sock:

Backing up Library/Application Support/espanso ...
Traceback (most recent call last):
  File "/opt/homebrew/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.35', 'console_scripts', 'mackup')())
  File "/opt/homebrew/Cellar/mackup/0.8.35/libexec/lib/python3.10/site-packages/mackup/main.py", line 93, in main
    app.backup()
  File "/opt/homebrew/Cellar/mackup/0.8.35/libexec/lib/python3.10/site-packages/mackup/application.py", line 117, in backup
    utils.copy(home_filepath, mackup_filepath)
  File "/opt/homebrew/Cellar/mackup/0.8.35/libexec/lib/python3.10/site-packages/mackup/utils.py", line 105, in copy
    shutil.copytree(src, dst)
  File "/opt/homebrew/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 558, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/opt/homebrew/Cellar/[email protected]/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 512, in _copytree
    raise Error(errors)
shutil.Error: [('/Users/user/Library/Application Support/espanso/espanso.sock', '/Users/user/.backups/Library/Application Support/espanso/espanso.sock', "[Errno 102] Operation not supported on socket: '/Users/user/Library/Application Support/espanso/espanso.sock'"), ('/Users/user/Library/Application Support/espanso/worker.sock', '/Users/user/.backups/Library/Application Support/espanso/worker.sock', "[Errno 102] Operation not supported on socket: '/Users/user/Library/Application Support/espanso/worker.sock'")]

jaklan avatar Aug 13 '22 21:08 jaklan

I have the same issue

fharper avatar Sep 02 '22 00:09 fharper

Hmm, should we adjust it to selectively backup files instead of the whole directory? Perhaps the worker.sock file can't be sync by mackup.

joshmedeski avatar Sep 02 '22 13:09 joshmedeski

That's usually the issue, yes, that would help.

lra avatar Sep 02 '22 16:09 lra

I would backup all YAML files since you can use multiple configurations files to target different apps or just have the shortcuts clearer.

It's not possible to copy any .sock files on macOS, so yeah, I guess that's the problem.

fharper avatar Sep 02 '22 16:09 fharper

@lra could we introduce a blacklisting feature so as to avoid sock files? I think it's a new concept for Mackup.

joshmedeski avatar Sep 02 '22 16:09 joshmedeski

It's impossible to do so, when you link a folder, you don't have any knowledge of the files in the folder.

lra avatar Sep 02 '22 17:09 lra

I see. I'd suggest to those that want a workaround right now. You can create your own subfolder and sync it directly.

[application]
name = espanso

[configuration_files]
Library/Preferences/espanso/my-snippets
Library/Application Support/espanso/my-snippets

[xdg_configuration_files]
espanso/my-snippets

I believe Espanso supports nested directories. Hopefully we can come up with a better solution in the future.

joshmedeski avatar Sep 02 '22 17:09 joshmedeski