1 |
Sorry if this is a silly thought, but after reading about the problems of |
2 |
unmerging packages, and never knowing if they were still needed by the |
3 |
system, I had a thought, and reckoned I should suggest it. Technically I'm |
4 |
a newbie here so feel free to put me down if this is useless :) |
5 |
|
6 |
basically, could the idea of semaphores from threading be used here? When a |
7 |
package is installed, it is recorded in some 'installed-packages' file (I |
8 |
guess gentoo has such a thing already), along with the number 0. e.g. |
9 |
|
10 |
XFree 0 |
11 |
|
12 |
then, when a program is merged that depends on said package, it increments |
13 |
the semaphore (or if you like, dependancy-value) : thus, emerging kde |
14 |
|
15 |
XFree 1 |
16 |
kde 0 |
17 |
|
18 |
so, X is now depended on by 1 program. |
19 |
but, say after using kde, we decide its awfull (not likely...), and want rid |
20 |
of it, so we unmerge it. Checking the list, kde is not needed by anything |
21 |
(it is stored with the value 0) so we happily pull it out of the system. |
22 |
Knowing that kde depended on X, we decrement X's dependancy value by one, |
23 |
as kde has left, leaving us with |
24 |
|
25 |
XFree 0 |
26 |
|
27 |
Probably needs some refining, and I admit to knowing little about the inners |
28 |
of the gentoo system, but just thought it worth posting. |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
-- |
34 |
gentoo-dev@g.o mailing list |