I think the commit message explains this pretty well, but I wanted to give a heads up message because this is very likely to ring a few bells the first time through. I personally noticed it as result of the recent termcap change, and I’m sure I’m not the only one with stale stuff in /etc/ in particular.
Please make sure that you employ (what should be) the usual precaution of backing up /etc before running this version of mergemaster. I also encourage regular use of the -P option (or PRESERVE_FILES=yes in ~/.mergemasterrc or /etc/mergemaster.rc) however while I believe that this new code is -P safe backing up /etc first is preferred this time around.
Date: Sat Dec 12 02:19:41 2009
New Revision: 200425
Over time things that used to be files/directories/links can change to something else. So add code to detect when things don't match and give the user choices about how to fix it.
If we're using -P and something in the above check needs to be moved we need to have the directory there for it, so create it at the beginning and delete empty versions of it at the end.
The case where something used to be a file or link and now is supposed to be a directory (e.g., /etc/security) is especially dangerous, so make failure to install a necessary directory in $DESTDIR a fatal error.