Gentoo Archives: gentoo-dev

From: Murray Evans <m.evans@××××××.uk>
To: gentoo-dev@g.o
Subject: [gentoo-dev] thought on dependancies for package merge/unmerge
Date: Thu, 11 Dec 2003 05:50:33
Message-Id: br9km5$sb$
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 :)
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.
10 XFree 0
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
15 XFree 1
16 kde 0
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
25 XFree 0
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.
33 --
34 gentoo-dev@g.o mailing list


Subject Author
Re: [gentoo-dev] thought on dependancies for package merge/unmerge Andrew Gaffney <agaffney@×××××××××××××××××××.net>