Gentoo Archives: gentoo-dev

From: Kalin KOZHUHAROV <kalin@××××××××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] RFC: emerge snapshots
Date: Tue, 24 Jan 2006 17:15:35
Message-Id: 43D66006.4090504@thinrope.net
1 Hi all.
2
3 During the last many months, more than once an idea occured in my mind, so I
4 decided to share it.
5
6
7 2006-01-25T01:34 kalin $ dd if=/dev/brain of=gentoo-dev bs=1 count=3292
8
9 Do you think it will be good to have something like a snapshot of the
10 installed packages?
11 Something that will help when something unexpectedly breaks and you cannot
12 fix it bu shuffling around its dependencies.
13
14 Because s--t does happen; sometimes.
15
16 Right now vmware-workstaion is broken and I am failing to understand why for
17 the last few hours. But that is just an example, forget about it.
18
19 So how can we get that thing? Let's call it "emerge snapshot" not to be
20 confused with portage snapshots used during install.
21
22 One way is to employ a version control system, say subversion, to keep the
23 list of installed packages. It has to be updated during emerge.
24 Also there should be a way to insert markers like "OK, tested and working",
25 "going to try this fuzzy foo install, mark!" All these should be timestamped.
26
27 So after the "_BANG_ my box is b0rked", it will be easy to retrace your
28 steps by just doing `emerge --log 3` to see the last three labels/log entries:
29
30 3544 2006-01-01T12:12 OK, tested and working
31 3545 2006-01-01T12:12 going to try this fuzzy foo install, mark
32 3546 2006-01-01T12:12 yay, new modular X is in ~arch (-:
33
34 then `emerge --revert -r3544` and everything is smooth and runnig again.
35
36 The "behind the scenes" actions to be taken by portage is to unmerge
37 everything that was merged after -r3544
38
39 That was the easy part.
40
41 Now what if some config file is b0rked?
42
43 Solution 0 (slow, disk space):
44
45 _before_ upgrading a package, or even before installing the same package in
46 a new SLOT, do `quickpkg $PACKAGE`
47
48 Solution 1 (better): Anybody?
49
50
51 Some notes to consider:
52
53 AFAIK, at present portage leaves most (all?) files that are in
54 CONFIG_PROTECT on unmerge... is there any easy way to trace which files are
55 left over in the system and delete them? Parsing the logs might help, but
56 unless it is automated it will be error prone and cumbersome.
57
58 Now imagine this timeline:
59 r100
60 emerge foo
61 r101
62 emerge --unmerge foo
63 r102
64
65 Is there anything else to be taken care so that the system @r100 and @102 is
66 the same? (sans system logs, user created files and the like)
67
68 I guess all the tools and info are already in portage and by writing a bunch
69 of scripts (to parse the logs mainly) it will be feasible to make it work.
70 But if it is automated, this will give _HUGE_ advantages:
71
72 1. Users will be instructed to revert to a good point when something breaks.
73 Probably an automated reporter can be hacked up
74
75 2. Bugs can easily be confirmed if there is enough CPU power
76 (Give me your broken "emerge snapshot" and the one before that)
77
78 3. devs and trying-to-be-devs, testers will be able to test easily if
79 package foo-2.3.4 does break something without the need of things like
80 vmware (snapshots)
81
82 4. Any n00b will have the "Ctrl+Z", "Recycle bin", "Trash bin", ":undo"
83 whatever to their whole system
84
85 5. (dangerous) Experimenting on semi-production servers will be easy!
86
87 6. Given the above 5, Gentoo user base will grow enourmously:
88
89 "You have the flexibility, now you have stability. No need to dream, welcome
90 to reality: it's called Gentoo!" (from the 2006.3 release campaign :-)
91
92 I know it is far from a GLEP, but let me first see how people feel about it.
93 Even if not implemented as a whole (at first) it will greatly improve our
94 Gentoo life.
95
96 Any comments? It is an RFC after all :-)
97
98 2006-01-25T02:07 kalin $
99 --
100 |[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
101 +-> http://ThinRope.net/ <-+
102 |[ ______________________ ]|
103 --
104 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] RFC: emerge snapshots Marius Mauch <genone@g.o>
Re: [gentoo-dev] RFC: emerge snapshots Wernfried Haas <amne@g.o>
Re: [gentoo-dev] RFC: emerge snapshots Sven Vermeulen <svermeulen@××××××.be>