Gentoo Archives: gentoo-portage-dev

From: Alec Warner <antarus@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH 1/3] Have repoman check if the packages to unpack rare archive formats from SRC_URI are present in DEPEND (bug #205909).
Date: Fri, 17 Jan 2014 06:14:13
Message-Id: CAAr7Pr-oRY6XmZ4ip6zrgiV7UFKKk+OWpsGuM9DV007TkzPNoA@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH 1/3] Have repoman check if the packages to unpack rare archive formats from SRC_URI are present in DEPEND (bug #205909). by Tom Wijsman
1 On Thu, Jan 16, 2014 at 3:02 PM, Tom Wijsman <TomWij@g.o> wrote:
2
3 > -----BEGIN PGP SIGNED MESSAGE-----
4 > Hash: SHA1
5 >
6 >
7 I want to summarize our IRC conversation on the list.
8
9
10
11 > On Thu, 16 Jan 2014 23:22:44 +0100
12 > Alexander Berntsen <alexander@××××××.net> wrote:
13 >
14 > > Your ill-placed attempts at being clever are missing the point.
15 >
16 > Why are they missing the point?
17 >
18
19 I think the point Alexander is trying to make here is also a point I tried
20 to make on IRC. Many times large refactoring projects fail. I've tried to
21 do them in Portage, and they have failed. I think folks are leery of this.
22 We are often more comfortable with incremental changes. That means one
23 change at a time; portage is a large ship and I don't think anyone is under
24 the impression that portage will 'turn on a dime.'
25
26 What I think we are trying to avoid, is changes that go in the opposite
27 direction.
28
29
30 >
31 > > Portage is a mess. We don't need it to become more messy to the point
32 > > of maintainability.
33 >
34 > How do we plan to fix that?
35
36
37 Summarizing from our IRC conversation:
38
39 Generally one of the first things you decide to do when you want to clean
40 something up is to stop making new messes. I think that is the logic we are
41 trying to convey here. Repoman has a giant unreadable loop that runs in
42 module scope. All variables are global shared variables. Trampling on
43 variables used by other functions is commonplace. So when we say 'add new
44 code in a function', we say that because adding functions protects you from
45 this mess.
46
47 You get your own locals(). Using globals() triggers warnings. Shadowing
48 variables triggers warnings. The function is callable (you could write a
49 test, for instance.) These are all positive things. I realize they are not
50 necessarily the 'refactoring' you want; however I think most people
51 consider these as positive attributes of functions, which is why we are
52 advocating for them.
53
54 I am in no way claiming that 'putting code in functions' is somehow the
55 best system, or the most maintainable system; merely that it is much better
56 than what we have today. It also costs almost nothing to implement. As we
57 discussed on IRC, even placing this code in a function in repoman itself
58 offers most of these benefits.
59
60
61 >
62 > > Yes, no one fixing bugs (because they are all designing a grand
63 > > redesign of Portage) would be bad.
64 >
65 > Do you agree?
66 >
67
68 Again, I think this is an appeal for incremental changes, and not huge
69 hard-to-grasp changes.
70
71
72 >
73 > > However, this is not likely to happen.
74 >
75 > Why do you think so?
76 >
77 > > It hasn't happened before.
78 >
79 > It could happen in the future.
80 >
81 > > And now we have a bunch of great new volunteers.
82 >
83 > Yes, we do.
84 >
85
86 I'm not really following this part of the conversation. Speaking has
87 someone who has tried the grand refactoring of portage; it has not worked
88 well for me in the past. Incremental changes are easier to get accepted,
89 they get released more often, they are tested faster, and so forth.
90
91
92 >
93 > > Sebastian even *told* you specifically how to do this properly.
94 >
95 > I think he was referring to the feedback that Sebestian gave on the thread
96 > later on. I recommend you consider incorporating
97
98 the feedback into your patch.
99 >
100
101 I think he was referring to the feedback that Sebastian gave you on the
102 thread later on.
103
104
105 > > So please do.
106 >
107 > Why?
108 >
109
110 Look, I realize Alexander (and probably myself) didn't have a great tone;
111 but I thought Sebastian's feedback was pretty useful. Is there some reason
112 you wouldn't want to incorporate it?
113
114 -A
115
116 >
117 > - --
118 > With kind regards,
119 >
120 > Tom Wijsman (TomWij)
121 > Gentoo Developer
122 >
123 > E-mail address : TomWij@g.o
124 > GPG Public Key : 6D34E57D
125 > GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D
126 > -----BEGIN PGP SIGNATURE-----
127 > Version: GnuPG v2.0.22 (GNU/Linux)
128 >
129 > iQEcBAEBAgAGBQJS2GT9AAoJEJWyH81tNOV95ukH+wZ0yB4KOgfOd6z90cpYC0Ec
130 > 4RLK8HbKVYIIytxnnhR5Ny/BR5/ANlOYQDIFUytkJyKNmVPx3nP6kY+wHD5qOYkF
131 > 3DlJpxRy6wx/E43+wpvVv+dSNDHxkvyy8OeZ5QuAcFi1oYaeYdctfOU4/URihGzO
132 > MjA5h0ydQ8CcHoTMkJsFjS7wL3HdSy1m1SRh9kiOuOr9hz4HqOImjJQ1/6Yb38uS
133 > MVewW2oMEnEB99UANB5CswZHvvHcxU6d4hSmKlL1DfEuEq8hodM552n+WqpTgRhW
134 > YzLmhUFqe0fkS9p4wAa5tPDB8O34P+nEvSAwtVqDFwqJmX0+H+r2INp7LJmDARo=
135 > =FaJT
136 > -----END PGP SIGNATURE-----
137 >

Replies