1 |
On Sat, Apr 26, 2008 at 1:00 PM, Alan McKinnon <alan.mckinnon@×××××.com> wrote: |
2 |
> On Saturday 26 April 2008, Mark Knecht wrote: |
3 |
> |
4 |
> > I don't buy that it's my issue created by a long time between |
5 |
> > updates. I could turn on any machine that's sitting in a junk heap or |
6 |
> > back room somewhere. It hasn't been powered up in a long time. I log |
7 |
> > in and want to figure out what's in front of me with respect to |
8 |
> > updates. I type emerge sync and portage deletes files. to me that's |
9 |
> > just wrong. |
10 |
> |
11 |
> Mark, |
12 |
> |
13 |
> This might be worth discussing. I know you said "enough of this" later |
14 |
> on but enough users run into conceptually similar issues to make it |
15 |
> worth while. Examples: someone needs a specific kernel version for some |
16 |
> hardware and it goes away from portage or weird video cards where only |
17 |
> ATIs magic from 2005 actually works. |
18 |
> |
19 |
> First, let's look at the real source of the problem: using rsync to |
20 |
> download the tree. To know what will change or what's new portage needs |
21 |
> a new tree, and there is no summary for that. It really needs two trees |
22 |
> to run a diff against and it has to be done locally - the rsync server |
23 |
> is clueless about what you currently have. So basically to tell you |
24 |
> what will change, portage has to have a new tree which nukes the old |
25 |
> stuff... |
26 |
> |
27 |
> One could write a dual-portage thingy that replicates what you have then |
28 |
> does emerge --sync, and also has an --undo fetaure for just in case. |
29 |
> Ughh. One must take account of the portage db, the metacache and other |
30 |
> bits as well. |
31 |
> |
32 |
> So how about something that creates overlays for you? As a wrapper to |
33 |
> emerge? It could have options to convert various bits of the current |
34 |
> system to private overlays, and generate a decent cache to speed things |
35 |
> up (the current state of affairs will not cache a local overlay by |
36 |
> default so it's really slow). I'm thinking of these things: |
37 |
> |
38 |
> - Install every currently installed ebuild to an overlay, or install |
39 |
> specific ebuilds or specific categories to an overlay. |
40 |
> - Copy an installed ebuild and it's entire installed DEPEND tree to an |
41 |
> overlay - this is for cases where <arb_lib> is not in world but is |
42 |
> required as a deep dependency of something that is. The user will |
43 |
> probably not be aware of this dependency and not having that ebuild |
44 |
> will break stuff. |
45 |
> - Copy an entire profile to an overlay |
46 |
> - Copy everything in an installed ebuild's SRC_URI (or all installed |
47 |
> ebuilds) to a different DISTDIR for safety (think ATI driver downloads |
48 |
> or kernels here) |
49 |
> - Remove old ebuilds and profiles from the overlay that you have since |
50 |
> upgraded |
51 |
> - Possibly more |
52 |
> |
53 |
> Such a script would do the backup you wished you had done for your |
54 |
> folks, but only the bits you had installed (not everything), then run |
55 |
> emerge. You get a good compromise between you needing old stuff to be |
56 |
> around and the dev's perfectly reasonable desire to not have to support |
57 |
> old stuff not in common use. |
58 |
> |
59 |
> It could be implemented one of these ways: |
60 |
> - a new feature to portage - highly unlikely considering the fear and |
61 |
> dread that comes with modifying portage in it's current state |
62 |
> - a new feature to paludis - this might be possible as I believe |
63 |
> paludis' code design is quite sane |
64 |
> - a wrapper around emerge (easiest and most likely to benefit the |
65 |
> largest numbers if interested users) |
66 |
> |
67 |
> Alan McKinnon |
68 |
|
69 |
Alan, |
70 |
I've been playing with eix-test-obsolete. I think possibly it could |
71 |
help in this area. |
72 |
|
73 |
The machine is completely clean with emerge world, emerge -DuN |
74 |
world, emerge --depclean and revdep-rebuild. After using |
75 |
eix-test-obsolete for awhile and cleaning things up it now correctly |
76 |
shows two packages currently on my machine for which there are no |
77 |
matching entries in the database: |
78 |
|
79 |
lightning ~ # eix-test-obsolete |
80 |
|
81 |
No non-matching entries in /etc/portage/package.keywords. |
82 |
No non-matching entries in /etc/portage/package.mask. |
83 |
No non-matching entries in /etc/portage/package.unmask. |
84 |
No non-matching or empty entries in /etc/portage/package.use. |
85 |
No non-matching or empty entries in /etc/portage/package.cflags. |
86 |
The following installed packages are not in the database: |
87 |
|
88 |
net-im/gaim |
89 |
net-print/hpijs |
90 |
-- |
91 |
|
92 |
No redundant entries in /etc/portage/package.keywords (or test switched off). |
93 |
No redundant entries in /etc/portage/package.mask (or test switched off). |
94 |
No redundant entries in /etc/portage/package.unmask (or test switched off). |
95 |
No redundant entries in /etc/portage/package.use (or test switched off). |
96 |
No redundant entries in /etc/portage/package.cflags (or test switched off). |
97 |
No uninstalled entries in /etc/portage/package.keywords (or test switched off). |
98 |
No uninstalled entries in /etc/portage/package.mask (or test switched off). |
99 |
No uninstalled entries in /etc/portage/package.unmask (or test switched off). |
100 |
No uninstalled entries in /etc/portage/package.use (or test switched off). |
101 |
No uninstalled entries in /etc/portage/package.cflags (or test switched off). |
102 |
All installed versions of packages are in the database (or test switched off). |
103 |
lightning ~ # eix -I gaim |
104 |
No matches found. |
105 |
lightning ~ # eix -I hpijs |
106 |
No matches found. |
107 |
lightning ~ # emerge -Cp gaim |
108 |
|
109 |
>>> These are the packages that would be unmerged: |
110 |
|
111 |
net-im/gaim |
112 |
selected: 1.5.0 |
113 |
protected: none |
114 |
omitted: none |
115 |
|
116 |
>>> 'Selected' packages are slated for removal. |
117 |
>>> 'Protected' and 'omitted' packages will not be removed. |
118 |
|
119 |
lightning ~ # emerge -Cp hpijs |
120 |
|
121 |
>>> These are the packages that would be unmerged: |
122 |
|
123 |
net-print/hpijs |
124 |
selected: 1.7.1 |
125 |
protected: none |
126 |
omitted: none |
127 |
|
128 |
>>> 'Selected' packages are slated for removal. |
129 |
>>> 'Protected' and 'omitted' packages will not be removed. |
130 |
|
131 |
lightning ~ # |
132 |
|
133 |
Here's my idea: How hard would it be to have eix-test-obsolete |
134 |
verify against the global database instead of the local database? If I |
135 |
ran it that way *before* I ran emerge --sync then it would tell me |
136 |
effectively which packages would be removed after syncing. I could |
137 |
then move what I need to move by hand, run emerge --sync, and I'd |
138 |
still be clean because I've saved my files into my private overlay |
139 |
before the sync operation can delete them. |
140 |
|
141 |
If an enhancement like that is fairly simple - I have no idea - |
142 |
then that would be a great start. Still, it's not protection against |
143 |
the root cause of the problem, but it's a simple way to see ahead of |
144 |
time what might happen. |
145 |
|
146 |
Cheers, |
147 |
Mark |
148 |
-- |
149 |
gentoo-user@l.g.o mailing list |