Gentoo Archives: gentoo-dev

From: Troy Dack <tad@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Unmerging and CONFIG_PROTECT
Date: Sat, 28 Feb 2004 14:40:02
Message-Id: 1077979220.14197.6.camel@carbon
In Reply to: Re: [gentoo-dev] Unmerging and CONFIG_PROTECT by Jason Stubbs
1 On Sat, 2004-02-28 at 21:41, Jason Stubbs wrote:
2 > On Saturday 28 February 2004 12:03, Georgi Georgiev wrote:
3 > > maillog: 28/02/2004-09:22:09(+0900): Jason Stubbs types
4 > >
5 > > > Basically, I'm suggesting that config files that have never been changed
6 > > > be removed as they will be restored upon reinstallation. Anything that
7 > > > has changed shouldn't be removed and anything that was added since
8 > > > installation won't be tracked anyway.
9 > >
10 > > Currently, when a new merge would overwrite a CONFIG_PROTECTed file, it
11 > > creates a file named ._cfg????_originalfile if the file has been changed.
12 > >
13 > > What if something similar is made when unmerging packages? Unmerging a
14 > > CONFIG_PROTECTed file that has not been changed removes the file right
15 > > away. If it was changed, an empty ._cfg????_file is created, with some way
16 > > to distinguish that it is supposed to express deletion (setting the sticky
17 > > bit for example). etc-update can be used to delete the file later, after it
18 > > is updated to recognize empty sticky files as a pointer to delete the
19 > > original file.
20 >
21 > Yep, that's definitely one problem. Another I thought of was when unmerging a
22 > package that provides an init script that has not yet been stopped. Seems
23 > like there are several issues that need to be thought through. Thanks for the
24 > input.
25 >
26
27 Perhaps ebuilds that provide services should start using the
28 pkg_prerm/pkg_postrm and pkg_preinst/pkg_postinst functions to do things
29 like:
30 Stop the currently running service
31 Start the new service
32
33 I seem to remember from my days of using RH that when installing a new
34 version of something like apache, once the new version was in place, the
35 service was restarted, but I could be wrong.
36
37 I know that some people will not like this at all, so perhaps it could
38 be a conditional thing (maybe a variable in make.conf) that defaults to
39 off and has to be explicitly turned on.
40
41 Or maybe it should only happen if it is an ebuild revision
42 (foo-1.2.3-r1) and not an upgrade, eg: foo-1.2.3 -> foo-1.3.0.
43
44 --
45 Troy Dack Gentoo moves pretty fast; if you don't stop and
46 tad@g.o look around once in a while, you could miss out.
47
48 Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x4D90BE3C
49 Key fingerprint = 1F3D 6C15 16AA 09D5 0C96 92E5 FD89 16F9 4D90 BE3C

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Unmerging and CONFIG_PROTECT Spider <spider@g.o>