Sorry if this is a silly thought, but after reading about the problems of
unmerging packages, and never knowing if they were still needed by the
system, I had a thought, and reckoned I should suggest it. Technically I'm
a newbie here so feel free to put me down if this is useless :)

basically, could the idea of semaphores from threading be used here? When a
package is installed, it is recorded in some 'installed-packages' file (I
guess gentoo has such a thing already), along with the number 0. e.g.

XFree 0

then, when a program is merged that depends on said package, it increments
the semaphore (or if you like, dependancy-value) : thus, emerging kde

XFree 1
kde 0

so, X is now depended on by 1 program.
but, say after using kde, we decide its awfull (not likely...), and want rid
of it, so we unmerge it. Checking the list, kde is not needed by anything
(it is stored with the value 0) so we happily pull it out of the system.
Knowing that kde depended on X, we decrement X's dependancy value by one,
as kde has left, leaving us with

XFree 0

Probably needs some refining, and I admit to knowing little about the inners
of the gentoo system, but just thought it worth posting. 




--
[EMAIL PROTECTED] mailing list

Reply via email to