It seems that dispatch-conf have some issues handling symlinks. The error is reproducable, just put -config-protect-if-modified and rebuild openrc, then run dispatch-conf. sabre ~ # dispatch-conf dispatch-conf: Error copying /etc/init.d/functions.sh to /etc/config-archive/etc/init.d/functions.sh: [Errno 17] File exists: '/etc/config-archive/etc/init.d/functions.sh'; fatal sabre ~ # ls -l /etc/config-archive/etc/init.d/functions.sh lrwxrwxrwx 1 root root 25 Jan 6 22:09 /etc/config-archive/etc/init.d/functions.sh -> /lib64/rc/sh/functions.sh Reproducible: Always
What version of sys-apps/portage do you have?
That would be sys-apps/portage-2.2.15.
When I added symlink support for bug 485598, I didn't account for the fact that os.symlink fails if the destination file exists. For regular files, it uses shutil.copy2, which can also fail if the destination is a symlink. So, we should have it first remove the destination file regardless of the file type.
I have a patch in the following branch: https://github.com/zmedico/portage/tree/bug_535850 I've posted it for review here: http://thread.gmane.org/gmane.linux.gentoo.portage.devel/5064
This is in the master branch now: https://github.com/gentoo/portage/commit/79eb7417454220f04def35e428b876b97fdaabf4
Released in portage-2.2.16