mackup icon indicating copy to clipboard operation
mackup copied to clipboard

Cannot uninstall on macOS Monterey 12.1 - mackup 0.8.33

Open svenstehle opened this issue 3 years ago • 1 comments

Hi, I want to remove some files from my mackup using the ~/.mackup.cfg. It did not remove them from the cloud storage automatically and restore them on my machine. So I thought I'd give mackup uninstall a shot and run mackup backup again after...

Unfortunately, after it reverted a few entries, this is the verbose result. I replaced my username with <username>:

--- sublime-text-3 ---
Doing nothing, /Users/<username>/Google Drive/My Drive/Mackup/.config/sublime-text-3/Packages/User does not exist
Reverting /Users/<username>/Google Drive/My Drive/Mackup/Library/Application Support/Sublime Text 3/Packages/User
  at /Users/<username>/Library/Application Support/Sublime Text 3/Packages/User ...
Traceback (most recent call last):
  File "/usr/local/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.33', 'console_scripts', 'mackup')())
  File "/usr/local/Cellar/mackup/0.8.33/libexec/lib/python3.10/site-packages/mackup/main.py", line 146, in main
    app.uninstall()
  File "/usr/local/Cellar/mackup/0.8.33/libexec/lib/python3.10/site-packages/mackup/application.py", line 264, in uninstall
    utils.copy(mackup_filepath, home_filepath)
  File "/usr/local/Cellar/mackup/0.8.33/libexec/lib/python3.10/site-packages/mackup/utils.py", line 105, in copy
    shutil.copytree(src, dst)
  File "/usr/local/Cellar/[email protected]/3.10.1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 556, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/usr/local/Cellar/[email protected]/3.10.1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 512, in _copytree
    raise Error(errors)
shutil.Error: [('/Users/<username>/Google Drive/My Drive/Mackup/Library/Application Support/Sublime Text 3/Packages/User/KiteSublime.sublime-settings', '/Users/<username>/Library/Application Support/Sublime Text 3/Packages/User/KiteSublime.sublime-settings', "[Errno 1] Operation not permitted: '/Users/<username>/Library/Application Support/Sublime Text 3/Packages/User/KiteSublime.sublime-settings'")]

I am afraid to force mackup --root --force uninstall ... should I ??? I don't want to break all my configuration. How can I fix this situation?

The file in question is owned by my <username>:

$ ls -la Library/Application\ Support/Sublime\ Text\ 3/Packages/User/KiteSublime.sublime-settings
-rwx------  1 <username>  staff  55 Aug 21  2020 Library/Application Support/Sublime Text 3/Packages/User/KiteSublime.sublime-settings

Interestingly enough, when I do

$ chmod 777 Library/Application\ Support/Sublime\ Text\ 3/Packages/User/KiteSublime.sublime-settings

$ ls -la Library/Application\ Support/Sublime\ Text\ 3/Packages/User/KiteSublime.sublime-settings   
-rwxrwxrwx  1 <username>  staff  55 Aug 21  2020 Library/Application Support/Sublime Text 3/Packages/User/KiteSublime.sublime-settings

the result after running mackup uninstall is

$ ls -la Library/Application\ Support/Sublime\ Text\ 3/Packages/User/KiteSublime.sublime-settings
-rwx------  1 <username>   staff  55 Aug 21  2020 Library/Application Support/Sublime Text 3/Packages/User/KiteSublime.sublime-settings

Permissions changed after running the script?

Please help. Thanks in advance :)

svenstehle avatar Jan 20 '22 18:01 svenstehle

The same goes for .aws... I removed it again from the ignore list in ~/.mackup.cfg:

Reverting Library/Preferences/com.apple.Music.plist ...
Reverting Library/Preferences/com.apple.Music.eq.plist ...
Reverting .aws ...
Traceback (most recent call last):
  File "/usr/local/bin/mackup", line 33, in <module>
    sys.exit(load_entry_point('mackup==0.8.33', 'console_scripts', 'mackup')())
  File "/usr/local/Cellar/mackup/0.8.33/libexec/lib/python3.10/site-packages/mackup/main.py", line 146, in main
    app.uninstall()
  File "/usr/local/Cellar/mackup/0.8.33/libexec/lib/python3.10/site-packages/mackup/application.py", line 264, in uninstall
    utils.copy(mackup_filepath, home_filepath)
  File "/usr/local/Cellar/mackup/0.8.33/libexec/lib/python3.10/site-packages/mackup/utils.py", line 105, in copy
    shutil.copytree(src, dst)
  File "/usr/local/Cellar/[email protected]/3.10.1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 556, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
  File "/usr/local/Cellar/[email protected]/3.10.1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 512, in _copytree
    raise Error(errors)
shutil.Error: [('/Users/<username>/Google Drive/My Drive/Mackup/.aws/config', '/Users/<username>/.aws/config', "[Errno 1] Operation not permitted: '/Users/<username>/.aws/config'"), ('/Users/<username>/Google Drive/My Drive/Mackup/.aws/get_session_token.sh', '/Users/<username>/.aws/get_session_token.sh', "[Errno 1] Operation not permitted: '/Users/<username>/.aws/get_session_token.sh'"), ('/Users/<username>/Google Drive/My Drive/Mackup/.aws/get_session_token_test.sh', '/Users/<username>/.aws/get_session_token_test.sh', "[Errno 1] Operation not permitted: '/Users/<username>/.aws/get_session_token_test.sh'"), ('/Users/<username>/Google Drive/My Drive/Mackup/.aws/credentials', '/Users/<username>/.aws/credentials', "[Errno 1] Operation not permitted: '/Users/<username>/.aws/credentials'")]

svenstehle avatar Jan 20 '22 18:01 svenstehle