Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1156

Picard fails to start when trying to upgrade plugin which is a symlink

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.0
    • 2.0
    • Plugins API
    • None

      For development I had setup a couple of plugins to be symlinks to the plugin directory checked out of git. E.g. in my `~/.config/MusicBrainz/Picard/plugins` I had entires like:

      lrwxrwxrwx 1 phw users 59 25. Jan 2015 fanarttv -> /home/phw/devel/musicbrainz/picard-plugins/plugins/fanarttv
      lrwxrwxrwx 1 phw users 77 27. Okt 2015 papercdcase.py -> /home/phw/devel/musicbrainz/picard-plugins/plugins/papercdcase.py

      The symlinks to directories will cause issues when upgrading and restarting Picard:

      Traceback (most recent call last):
        File "/usr/bin/picard", line 2, in <module>
          from picard.tagger import main; main('/usr/share/locale', True)
        File "/usr/lib/python3.6/site-packages/picard/tagger.py", line 776, in main
          tagger = Tagger(picard_args, unparsed_args, localedir, autoupdate)
        File "/usr/lib/python3.6/site-packages/picard/tagger.py", line 207, in _init_
          self.pluginmanager.load_plugindir(USER_PLUGIN_DIR)
        File "/usr/lib/python3.6/site-packages/picard/plugin.py", line 267, in load_plugindir
          self.remove_plugin(name)
        File "/usr/lib/python3.6/site-packages/picard/plugin.py", line 369, in remove_plugin
          shutil.rmtree(dirpath)
        File "/usr/lib/python3.6/shutil.py", line 490, in rmtree
          onerror(os.path.islink, path, sys.exc_info())
        File "/usr/lib/python3.6/shutil.py", line 488, in rmtree
          raise OSError("Cannot call rmtree on a symbolic link")
      OSError: Cannot call rmtree on a symbolic link

      I will submit a patch.

            outsidecontext Philipp Wolfer
            outsidecontext Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.0