1 |
Hello. |
2 |
|
3 |
Originally I've posted my thoughts about uninstalling with dependencies to gentoo-users but I was suggested to place it on devel mailing list. I've subscribed and here it is (with the comment from gentoo-user participator) |
4 |
|
5 |
Begin forwarded message: |
6 |
|
7 |
======================================================================= |
8 |
|
9 |
Date: Thu, 11 Sep 2003 13:11:39 +0900 |
10 |
From: Jason Stubbs <jasonbstubbs@×××××××××××.com> |
11 |
To: gentoo-user@g.o |
12 |
Subject: Re: [gentoo-user] uninstalling with dependencies [again ;)] |
13 |
|
14 |
|
15 |
On Wednesday 10 September 2003 19:13, Marcin Daczkowski wrote: |
16 |
> second thing. this script takes usually a lot of time to find out |
17 |
> interesting to us informations. i do not really understand why it is like |
18 |
> that. to be honest i haven't even analyse it [yeah i'm lasy] to much but i |
19 |
> thought about sth like that: |
20 |
> |
21 |
> why not prepare such a imo trivial to implement and |
22 |
> fast solution. |
23 |
> |
24 |
> let there be such a file somewhere in /usr/portage in the format of: |
25 |
> |packet-name quantity |
26 |
> |packet-name quantity |
27 |
> |... |
28 |
> |
29 |
> let it be /usr/portage/deps |
30 |
> |
31 |
> when some packed is emerged directly via #emerge packet-name it lands in |
32 |
> this file whith value -1, but when #emerge other-packet-name just depends |
33 |
> on some packet: |
34 |
> |
35 |
> 1) which is not installed, the line with this packet name with value 1 is |
36 |
> added. |
37 |
> |
38 |
> 2) which has been installed as dependency of another one [i mean cat |
39 |
> /usr/portage/deps | grep packet-name gives true] its quantity in this deps |
40 |
> file is increased by one. |
41 |
> |
42 |
> there probably should be second file with information for each |
43 |
> packet installed on system showing names of ebuild that were merged in |
44 |
> order to install it. |
45 |
> |
46 |
> when we want uninstall packet with dependencies we should be able to do |
47 |
> it like that: |
48 |
> |
49 |
> #emerge unmerge --with-deps packet-name |
50 |
> |
51 |
> the algorithm could be as follows: |
52 |
> |
53 |
> 1) extract deps of packet-name |
54 |
> 2) for each of them check its quantity in /usr/portage/deps if |
55 |
> it's >1 decrease when -1 do not touch only inform [its because that this |
56 |
> packet was installed directly we do not to |
57 |
> |
58 |
> automaticly unmerge it] when 0 do same as this shell command |
59 |
> would do: |
60 |
> |
61 |
> #emerge unmerge --with-deps packet-name |
62 |
> |
63 |
> |
64 |
> What do u think about that? Has someone commited sth like this as a patch |
65 |
> to portage or sth? Is there the thing that makes this solution useless, |
66 |
> needless & stupid? |
67 |
> |
68 |
> PS: the intention of this email was diffrent at the begining. but now it |
69 |
> should post it to -devel - heh, but i'm not even subscribed ;> [lazyness |
70 |
> again] |
71 |
|
72 |
This is a very good idea. This is a very good idea. Having a refcount on each |
73 |
package would increase performance somewhat. You'd still have to check for |
74 |
deps on each package down the tree, but that's better than looking at all |
75 |
packages. The only problem would be if the refcounts got out of sync for any |
76 |
reason, but having a rebuild-deps command would counter that. |
77 |
|
78 |
You should post this on -dev! |
79 |
|
80 |
Jason |
81 |
|
82 |
======================================================================= |
83 |
|
84 |
|
85 |
|
86 |
|
87 |
-- |
88 |
gentoo-dev@g.o mailing list |