Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: Brian Dolbec <dolsen@g.o>, gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [Patch] Repoman rewrite stage2 modularization conversion complete
Date: Tue, 15 Mar 2016 20:31:41
Message-Id: 56E8711C.4070407@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [Patch] Repoman rewrite stage2 modularization conversion complete by Zac Medico
1 On 03/15/2016 01:25 PM, Zac Medico wrote:
2 > On 03/15/2016 01:17 PM, Brian Dolbec wrote:
3 >> On Tue, 15 Mar 2016 12:42:51 -0700
4 >> Zac Medico <zmedico@g.o> wrote:
5 >>
6 >>> On 03/15/2016 12:38 PM, Zac Medico wrote:
7 >>>> On 03/15/2016 12:04 PM, Brian Dolbec wrote:
8 >>>>> On Mon, 14 Mar 2016 18:04:56 -0700
9 >>>>> Zac Medico <zmedico@g.o> wrote:
10 >>>>>
11 >>>>>
12 >>>>>>> The only consumer for that allvalid variable is the metadata
13 >>>>>>> UnusedCheck class.
14 >>>>>>>
15 >>>>>>> So the allvalid variable is True until found False
16 >>>>>>> by whichever checks along the way find it to be False. Like a
17 >>>>>>> fuse, it's good until it's blown, then it can never be good
18 >>>>>>> again. I don't think this particular variable justifies a
19 >>>>>>> special class that more fully mimics a fuse. Impossible to
20 >>>>>>> reset it like a breaker.
21 >>>>>>
22 >>>>>> Yeah, let's do it. It's a great opportunity to add clarity to the
23 >>>>>> code, and prevent future goofs.
24 >>>>>>
25 >>>>>
26 >>>>> Done, it is now dynamic_data['validity_fuse'] which is a Fuse
27 >>>>> instance.
28 >>>>
29 >>>> Nice, thank you!
30 >>>>
31 >>>> We can also use Fuse for the 'can_force' boolean, right?
32 >>>>
33 >>>
34 >>> For 'changed' as well.
35 >>
36 >> can_force, is yes
37 >>
38 >> changed is a no. It is the VCS module Changes class instance. I see
39 >> now that I described it wrong in the docstrings. Maybe I should rename
40 >> it for better clarity to changes_inst or vcs_changes... ideas?
41 >
42 > Maybe 'changes'?
43 >
44 > Also, now that we are using Fuse, can't we stop returning things from
45 > these functions entirely, so that dynamic_data is only updated by
46 > side-effects?
47 >
48
49 I think 'continue' is the only one left. We could just return a single
50 boolean, or use an exception to do what 'continue' does.
51 --
52 Thanks,
53 Zac