Gentoo Archives: gentoo-portage-dev

From: Christian Hoenig <list@××××××.cc>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [patch] emaint: check/fix package.{keywords,unmask}
Date: Thu, 16 Feb 2006 21:47:25
Message-Id: 200602162245.43043.list@hoenig.cc
In Reply to: Re: [gentoo-portage-dev] [patch] emaint: check/fix package.{keywords,unmask} by Brian Harring
1 Hi,
2
3 thanks for your input!
4
5 Attatched is a new version of the patch which cleans up code and additionally
6 adds a handler to cleanup the package.use file.
7
8 > > attached is a patch for emaint contained in the
9 > > sys-apps/portage-2.1_pre4-r1 package that adds support for checking and
10 > > fixing redundant entries in package.keywords and package.unmask.
11
12 [snip]
13 > Few things...
14 > -(self.noneInstalled , self.noneAffected) = checkDict( cfg.punmaskdict )
15 > +self.nonInstalled, self.noneAffected = checkDict(cfg.punmaskdict)
16 > is a bit more normal
17
18 OK, but removed that at all in my current version :-)
19
20 > check should actually do the checks, rather then having
21 > the work done during instantiation of the checker...
22
23 Actually the other modules (WorldHandler and VdbKeyHandler) do it excactly the
24 same way, thats why I decided to go this way, too.
25 And, as check and fix both use the same data, I think this is a good way to go
26 (as long as the actual instanciation is only done, when the module is called)
27
28 > potentially have
29 > a base class those checkers inherit from instead of having the funcs
30 > unbound (although this is definitely debatable).
31
32 Yes, I wanted to to this in the first place but my 'bad' python knowledge made
33 me use the unbound functions. But the new patch attatched has a base class
34 that handles all the shared stuff. The actual handlers are pretty small
35 now :-)
36
37 > Also...
38 > errors = []
39 > errors += map....
40 >
41 > just do
42 > errors = map...
43
44 ok, fixed that :-)
45
46 take care, have fun
47 /christian

Attachments

File name MIME type
emaint-2.1_pre4-r1.patch-r1.bz2 application/x-bzip2