Gentoo Archives: gentoo-portage-dev

From: Brian Dolbec <dolsen@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] repoman: filter out duplicate dependencies in error messages
Date: Tue, 05 Jan 2016 03:18:35
Message-Id: 20160104191741.0cc3c8a3.dolsen@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] repoman: filter out duplicate dependencies in error messages by Mike Frysinger
1 On Mon, 4 Jan 2016 16:30:30 -0500
2 Mike Frysinger <vapier@g.o> wrote:
3
4 > Some packages list the same atom multiple times (e.g. behind diff USE
5 > flags). If one of them throws an error, we end up listing it more
6 > than once, and the output can get verbose/useless.
7 > ---
8 > pym/repoman/scanner.py | 13 +++++++++++--
9 > 1 file changed, 11 insertions(+), 2 deletions(-)
10 >
11 > diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
12 > index d1c10d7..94ada90 100644
13 > --- a/pym/repoman/scanner.py
14 > +++ b/pym/repoman/scanner.py
15 > @@ -704,13 +704,22 @@ class Scanner(object):
16 >
17 > # we
18 > have some unsolvable deps # remove ! deps, which always show up as
19 > unsatisfiable
20 > -
21 > atoms = [
22 > +
23 > all_atoms = [ str(atom.unevaluated_atom)
24 > for
25 > atom in atoms if not atom.blocker]
26 > # if
27 > we emptied out our list, continue:
28 > - if
29 > not atoms:
30 > + if
31 > not all_atoms: continue
32 > +
33 > + #
34 > Filter out duplicates. We do this by hand (rather
35 > + #
36 > than use a set) so the order is stable and better
37 > + #
38 > matches the order that's in the ebuild itself.
39 > +
40 > atoms = []
41 > + for
42 > atom in all_atoms:
43 > +
44 > if atom not in atoms:
45 > +
46 > atoms.append(atom) +
47 > if
48 > self.options.output_style in ['column']:
49 > self.qatracker.add_error(mykey, "%s: %s: %s(%s) %s"
50
51
52 I immediately want to say REJECT!, REJECT!, REJECT!,...
53
54 I just spent a marathon week working on stage2 of the repoman rewrite.
55
56 I have all the checks and vcs related code in 2 plugin systems. I have
57 to move the vcs plugins to their final destination path still (minor
58 move)
59
60 I am going to start cleaning up the commits, do some rebasing and
61 unifying of them all now that I have it split up and working. Still
62 some more testing/debugging to do.
63
64 Hopefully be the end of this week it'll be ready for review and merge
65 soon.
66
67 If this is applied to current repoman, it may cause some rebase hell.
68
69 https://github.com/dol-sen/portage/tree/repoman
70
71 That is the repoman branch with the individualized checks that run in 3
72 small loops in scanner.py now. There is no code in scanner that does
73 any checks. Those are all in pym/repoman/modules/scan/*/*.py. Some
74 modules contain several different files and class definitions. There
75 are a bunch of new ones that I created from the code that still
76 remained in scanner.py's _scan_ebuilds(). I'll push the changes to teh
77 main gentoo portage repo's repoman branch once I have it cleaned up.
78
79 I would much prefer you re-base your patch on the rewrite code.
80
81 I will make a wiki page for the module definition requirements, with a
82 section on the vcs system as well. But the modules are quite simple,
83 only small changes from the initial code split we did already. So new
84 modules are easy to create and add in to the sequence of checks to
85 perform. You just have to be careful where you insert checks. As the
86 dynamic_data used and updated by the modules varies as it progresses
87 through the sequence. I have yet to document the data changed/required
88 by each of the modules. But they are quite clear looking at the code.
89
90
91
92 --
93 Brian Dolbec <dolsen>

Replies