1 |
On Saturday 28 February 2004 03:03, Georgi Georgiev wrote: |
2 |
> maillog: 28/02/2004-09:22:09(+0900): Jason Stubbs types |
3 |
> |
4 |
> > Basically, I'm suggesting that config files that have never been changed |
5 |
> > be removed as they will be restored upon reinstallation. Anything that |
6 |
> > has changed shouldn't be removed and anything that was added since |
7 |
> > installation won't be tracked anyway. |
8 |
> |
9 |
> Currently, when a new merge would overwrite a CONFIG_PROTECTed file, it |
10 |
> creates a file named ._cfg????_originalfile if the file has been changed. |
11 |
> |
12 |
> What if something similar is made when unmerging packages? Unmerging a |
13 |
> CONFIG_PROTECTed file that has not been changed removes the file right |
14 |
> away. If it was changed, an empty ._cfg????_file is created, with some way |
15 |
> to distinguish that it is supposed to express deletion (setting the sticky |
16 |
> bit for example). etc-update can be used to delete the file later, after it |
17 |
> is updated to recognize empty sticky files as a pointer to delete the |
18 |
> original file. |
19 |
|
20 |
I've been reading this thread with interest, as I have a similar design |
21 |
decision to make for the webapp-config code. |
22 |
|
23 |
I agree with Jason - a config file that hasn't been modified shouldn't be |
24 |
config-protected. No information is lost when the file is removed, and if a |
25 |
Gentoo user has edited the file, it'll get picked up because of the change in |
26 |
timestamp and md5sum. |
27 |
|
28 |
webapp-config has an added safeguard that I haven't found in the Portage code. |
29 |
When webapp-config is doing an upgrade, it looks at the contents file for the |
30 |
OLD version to see whether a file is config-protected or not. (We don't do |
31 |
directory-wide config-protection - it's not practical for us) Time, and user |
32 |
experience :-) will tell whether this approach works well or not. |
33 |
|
34 |
Best regards, |
35 |
Stu |
36 |
-- |
37 |
Stuart Herbert stuart@g.o |
38 |
Gentoo Developer http://www.gentoo.org/ |
39 |
Beta packages for download http://dev.gentoo.org/~stuart/packages/ |
40 |
It's time for the cruise ;-) http://www.phparch.com/cruise/ |
41 |
|
42 |
GnuGP key id# F9AFC57C available from http://pgp.mit.edu |
43 |
Key fingerprint = 31FB 50D4 1F88 E227 F319 C549 0C2F 80BA F9AF C57C |
44 |
-- |
45 |
|
46 |
-- |
47 |
gentoo-dev@g.o mailing list |