Gentoo Archives: gentoo-soc

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Re: New idea: network eclean
Date: Sat, 20 Mar 2010 18:07:12
Message-Id: 1269108422.2559.235.camel@big_daddy.dol-sen.ca
In Reply to: Re: [gentoo-soc] Re: New idea: network eclean by Dmitry Bashkatov
1 On Fri, 2010-03-19 at 23:28 +0300, Dmitry Bashkatov wrote:
2 > 2010/3/19 Brian Dolbec <brian.dolbec@×××××.com>:
3 > >>Dmitry Bashkatov
4 > >>
5 > >>Yes, I have already wrote a script. But it will be better to include
6 > >>this functionality to eclean.
7 > >
8 > > I am just completing a modular re-write of eclean. It will be included
9 > > in the new gentoolkit-0.3.0_rc10 release coming out any time now.
10 > >
11 > > There is now a place in the code that will accept external functions for
12 > > additional checks to determine if the file is to be cleaned or not. The
13 > > only thing missing is a possible configure/command line option to pass
14 > > them in for the search.
15 > >
16 > > I would be interested in your script to see how it may fit with the new
17 > > eclean.
18 > > --
19 > > Brian Dolbec <brian.dolbec@×××××.com>
20 > >
21 >
22 > Here it is! File /etc/enetclean.hosts must contain all hosts, which
23 > share distfiles. Format is <host> or <user>@<host>. Script doesn't
24 > delete anything. It just prints out files that can be deleted. To
25 > delete use "enetclean | xargs rm -f".
26 > There is unhandled situation when distfiles located in another
27 > location than default /usr/portage/distfiles. Also it doesn't handle
28 > any errors such as failed connection. But anyway I think this script
29 > will be completely rewritten.
30 >
31
32 Dmitry, eclean is written in python same as portage. For it to
33 integrate into eclean it too would also need to be written in python.
34 Unfortunately your script would not fit.
35
36 There are 2 pieces of information that would be required from the client
37 pc's the installed pkg list and the exclude file. The exclude file
38 being a debatable one. Since portage now needs a min. of python-2.6 it
39 should be possible for the network eclean module to import portage from
40 the client machine and obtain the installed pkg list. From there it
41 would be added to a global installed pkgs list that would then remove
42 any source files they claim to own. I think all other info and checks
43 would be handled by the eclean app running on the server.
44
45 As for the exclude file it may need to be transferred and parsed to
46 accumulate the results (trickier, due to possible conflicts).
47 alternatively that control might be better left controlled only on the
48 server.
49
50 Eclean would not need to installed on the client machines at all.
51
52 P.S. eclean assumes all files dirty and in need of cleaning unless
53 proven otherwise (due to the dynamic nature of the tree).
54 --
55 Brian Dolbec <brian.dolbec@×××××.com>

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-soc] Re: New idea: network eclean Dmitry Bashkatov <me@×××××××.name>