Which way should the symlink go? /opt/mycroft/skills <-> /home/pi/...?

This morning, while watching the Mark 1 upgrade mycroft-core (and mycroft-mark-1) to 18.8.2 I noticed the following error:

Creating soft link from /opt/mycroft/skills to /home/pi
ln: failed to create symbolic link ‘/home/pi/skills’: File exists

(The attempt is part of the final prettying-up of mycroft-core. See /var/lib/dpkg/info/mycroft-core.postinst.)

But looking at my system, /home/pi/skills is a symlink pointing to… you guessed it… /opt/mycroft/skills. So. Completely backwards. (I don’t recall if that was something support folks previously recommended I do, or if it is some natural state of affairs.)

In any case, I’m thinking about flipping them to what the postinst is expecting to see / do.

Your thoughts?

I believe it’s already correct. The real files are at /opt/mycroft/skills. In mycroft-core.postinst it does ln -s /opt/mycroft/skills /home/pi/ which means make a link to the real directory /opt/mycroft/skills in the directory /home/pi/ (I always have to check the order for ln before I execute it). This fails for you because the link already exists which is fine.

2 Likes

Brain fart. I must not have had my caffeine when I wrote that. You’re quite correct: I wrote that the script is doing exactly what it should be doing, and why I thought that it was backwards, I’ll never know. Early senility.