Code: Select all
#emerge -a colordiff rcsCode: Select all
#mkdir /etc/config-archiveCode: Select all
#
# dispatch-conf.conf
#
# Directory to archive replaced configs
archive-dir=/etc/config-archive
# Use rcs for storing files in the archive directory?
# (yes or no)
use-rcs=yes
# Diff for display
diff="colordiff -Nu %s %s"
# Pager for diff display
pager="less -R --no-init --QUIT-AT-EOF"
# Automerge files comprising only CVS interpolations (e.g. Header or Id)
# (yes or no)
replace-cvs=yes
# Automerge files comprising only whitespace and/or comments
# (yes or no)
replace-wscomments=yes
# Automerge files that the user hasn't modified
# (yes or no)
replace-unmodified=yes




This wasn't spotted as being a problem until recently, when people started getting (for example) xkb errors with dispatch-conf, or strange rstartd.real errors, or screwed up mime-magic files.MikeP wrote:though i wonder why the diff -a flag is set by default in its config? :/


I was aware of the some of the dangers with etc-update and thought I would be careful enough so that it would not mess up my system until I updated kde and had to update 100+ configuration files. There was no way I was going to examine each file so I had it finish without prompting. A few days later I tried to reboot and had major problems. My fstab and about 5 other essential files were overwritten. The system told me my hard drive was corrupt run fsck but when I tried to login to do this none of my passwords worked. Good thing I had a livecd handy and I knew I could boot off that and then do a chroot... After I figured out what happened all was well in about 3 reboots...Prefix following comment, with I used etc-update for months without it breaking my system
Code: Select all
# START bash completion -- do not remove this line
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
-if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \
- && [ -f /etc/bash_completion ]; then # interactive shell
- # Source completion code
- . /etc/bash_completion
+# interactive shell
+if [ "$PS1" ] && [ -f /etc/bash_completion ] ; then
+ if [ $bmajor -eq 2 -a $bminor '>' 04 ] || [ $bmajor -ge 3 ]; then
+ # Source completion code
+ . /etc/bash_completion
+ fi
fi
unset bash bmajor bminor
# END bash completion -- do not remove this line
>> (1 of 1) -- /etc/profile.d/bash-completion
>> q quit, h help, n next, e edit-new, z zap-new, u use-new
m merge, t toggle-merge, l look-merge:
Code: Select all
Traceback (most recent call last):
File "/usr/sbin/dispatch-conf", line 309, in ?
d.grind (portage.settings ['CONFIG_PROTECT'])
File "/usr/sbin/dispatch-conf", line 145, in grind
confs = filter (f, confs)
File "/usr/sbin/dispatch-conf", line 135, in f
self.replace(newconf, conf['current'])
File "/usr/sbin/dispatch-conf", line 222, in replace
os.system((DIFF_CONTENTS % (curconf, newconf)) + '>>' + self.config["log-file"])
AttributeError: dispatch instance has no attribute 'config'