Gentoo Archives: gentoo-dev

From: Andrew Gaffney <agaffney@×××××××××××××××××××.net>
To: m.evans@××××××.uk
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] thought on dependancies for package merge/unmerge
Date: Thu, 11 Dec 2003 07:22:38
Message-Id: 3FD86E5B.9070906@technaut.darktalker.net
In Reply to: [gentoo-dev] thought on dependancies for package merge/unmerge by Murray Evans
1 Murray Evans wrote:
2 > Sorry if this is a silly thought, but after reading about the problems of
3 > unmerging packages, and never knowing if they were still needed by the
4 > system, I had a thought, and reckoned I should suggest it. Technically I'm
5 > a newbie here so feel free to put me down if this is useless :)
6 >
7 > basically, could the idea of semaphores from threading be used here? When a
8 > package is installed, it is recorded in some 'installed-packages' file (I
9 > guess gentoo has such a thing already), along with the number 0. e.g.
10 >
11 > XFree 0
12 >
13 > then, when a program is merged that depends on said package, it increments
14 > the semaphore (or if you like, dependancy-value) : thus, emerging kde
15 >
16 > XFree 1
17 > kde 0
18 >
19 > so, X is now depended on by 1 program.
20 > but, say after using kde, we decide its awfull (not likely...), and want rid
21
22 I didn't like it ;)
23
24 > of it, so we unmerge it. Checking the list, kde is not needed by anything
25 > (it is stored with the value 0) so we happily pull it out of the system.
26 > Knowing that kde depended on X, we decrement X's dependancy value by one,
27 > as kde has left, leaving us with
28 >
29 > XFree 0
30 >
31 > Probably needs some refining, and I admit to knowing little about the inners
32 > of the gentoo system, but just thought it worth posting.
33
34 This is a good idea. I believe something generally like this has already been proposed for
35 the new portage (portage-ng), though.
36
37 --
38 Andrew Gaffney
39
40
41 --
42 gentoo-dev@g.o mailing list