dispatch-conf and etc-update seem to ignore any files that are under symlinked dirs. For example, if /etc/conf.d is a symlink to another location, and an ebuild updates a file in /etc/conf.d, etc-update and dispatch-conf won't notice the file that needs to be updated. I have a one line patch for each tool that fixes this by modifying the "find" statement to dereference symlinks (i also added a uniq, because sometimes it was getting multiple copies of the same file, after dereferencing).
Created attachment 84382 [details, diff] dispatch-conf-deference-symlinks.patch Patch to make dispatch-conf deference symlinks.
Created attachment 84383 [details, diff] etc-update-derefence-symlinks.patch Patch to make etc-update deference symlinks.
Thanks. These patches are in svn r3129 and r3130 for the next release.
Created attachment 84455 [details, diff] dispatch-conf-better-symlink.patch Better patch, the last one would get royally confused sometimes, this one seems to work better. This also adds a check if the ._cfg0000* file exists before trying to merge it. This should apply against a version with the previous patch already applied.
(In reply to comment #4) > Created an attachment (id=84455) [edit] > dispatch-conf-better-symlink.patch At a glance, that patch looks like it could make dispatch-conf more difficult to maintain. It would be nicer if the os.realpath calls could be factored out and isolated somehow.
What about the etc-update patch? The `readlink -f` makes the original patch unknown, which probably leads to problems similar to those from the first dispatch-conf patch.
The etc-update patch doesn't suffer from the same problems, it seems to work fine. I only noticed the problems on the setup with symlinks, without the links there didn't seem to be the same problems.
Created attachment 85717 [details, diff] dispatch-conf-find-fix.patch I have tested this patch on multiple machines over a couple of weeks, the problem with the original was that I forgot that uniq only works on sorted lists, so I sort the output of the find before piping it into uniq to kill duplicate entries. This shouldn't add any maintenance load and allows for symlinks in /etc.
*** Bug 149388 has been marked as a duplicate of this bug. ***
I also think there should be no difference between symbolic link and a directory. I agree with Zac that it may cause recursive issues, but it makes configuration simpler. For example, I use cross-compile environments which share the same state for many /etc/ folders. Portage creates the ._cfg* files but I need to update these by hand. Thanks!
FYI: Though it is not a direct solution, "etckeeper" manages files under git or bzr. It is requested in bug 216114. With best regards.