i have no idea on how dispatch-conf working internally, but it looks like it's not safe for use. there should be a more safe check to avoid such. any truncate or empty conf result by "half operation" of sdiff should be rejected by dispatch-conf, although i have no idea if there's a way to do so within the arch of dispatch- conf. (btw, there should be more document on what to do if one have problem with it. e.g.: how to roll back to exactly same as before the conf is merged) Reproducible: Always Steps to Reproduce: 1. emerge -u world 2. dispatch-conf 3. press 'm' to merge 4. when it show and let me merge side by side, press 'q', (ctrl+c seems no effect) 5. ls -l /etc/yourconfig, and see it's 0 byte Actual Results: config file is truncated (or be empty) Expected Results: file safely merged
Created attachment 63691 [details, diff] Catches error code of 'merge' command dispatch-conf is ignoring the error code of the merge command and assuming that all went okay. Catching the error code will fix this problem. I haven't tested this patch yet, but it should work okay.
This appears to be merged in...I am not sure when that happened, but I was fixing other "we don't check error messages" and noted this was already there.