Gentoo Archives: gentoo-portage-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Re: How to prevent dispatch-conf from reverting valid changes
Date: Wed, 01 Aug 2012 18:06:34
In Reply to: [gentoo-portage-dev] How to prevent dispatch-conf from reverting valid changes by Pacho Ramos
1 Pacho Ramos posted on Wed, 01 Aug 2012 12:19:20 +0200 as excerpted:
3 > On every openrc update I get dispatch-conf wanting to revert all my
4 > changes in /etc/conf.d files, like KEYMAP, clock...
5 >
6 > Is there any way to prevent it from doing that?
7 >
8 > Thanks a lot for the info
10 Interesting. I use etc-update here, and at least it (working with
11 portage) has a feature such that it takes the hash of the package's config
12 file, and as long as that doesn't change, it won't bother you again.
14 Of course if there's a change in the package's config file, it simply
15 diffs the files, thus returning hits for parts of the files that haven't
16 changed since the last time if they differ, because some other chunk of
17 the file is new (say one entirely new option in a file of dozens, the
18 rest of which haven't changed).
20 Between that and the auto-merge-trivial-changes (which would appear to be
21 comments in most cases) option, I don't get bothered /too/ often, tho it
22 /would/ be nice if it could check individual sections within the file,
23 spotting when they haven't changed, so it'd only bother me about the new
24 option, not the dozen old options I've already customized.
27 Another technique that I find helps with some files that I've changed a
28 lot, is to put all my changes (save for commenting the defaults where
29 necessary, if later changes won't override but instead accumulate) in a
30 section at the end. That way, the main config is identical to the
31 unchanged package config, so any changes to it immediately leap out, and
32 I can take those changes to the boilerplate section, then edit the file
33 afterward, making the corresponding changes to my custom section.
35 That tends to work pretty well, since I take all the changes upto the
36 point where it switches to my custom config, then I refuse the change
37 deleting it, and edit the file to make my custom changes based on the
38 boilerplate changes just called to my attention.
40 --
41 Duncan - List replies preferred. No HTML msgs.
42 "Every nonfree program has a lord, a master --
43 and if you use the program, he is your master." Richard Stallman