Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Alexander Berntsen <bernalex@g.o>
Subject: Re: [gentoo-portage-dev] How do we want to deal with Arfrever's bunch of patches?
Date: Sat, 12 Dec 2015 20:44:53
Message-Id: 566C8738.4010301@gentoo.org
In Reply to: Re: [gentoo-portage-dev] How do we want to deal with Arfrever's bunch of patches? by "Michał Górny"
1 On 12/12/2015 06:50 AM, Michał Górny wrote:
2 > On Sat, 12 Dec 2015 13:01:04 +0100
3 > Alexander Berntsen <bernalex@g.o> wrote:
4 >
5 >> Friends,
6 >>
7 >> As I'm sure you've noticed, Arfrever pushed a bunch of unreviewed
8 >> stuff. Michał reverted some of them as they were breaking changes in
9 >> addition to being unreviewed (oh, and of course they don't follow the
10 >> commit message format -- why would they). There's a bunch left.
11 >>
12 >> Do we want to cherry-pick Zac's patches (i.e. revert Arfrever's
13 >> patches), and have him put them up for review as usual? It's a bit of
14 >> a mess because of Zac's patches. If we go down this route it would
15 >> likely be easiest for Zac to revert them, since he'll be the more
16 >> confident regarding what to keep in the ensuing merge conflicts.
17
18 Yeah, I'd be happy to do that.
19
20 >> Arfrever asked that someone review the patches and keep them if they
21 >> are OK, and revert only the ones that are problematic. I think this
22 >> would be OK for now, but obviously not something we want to encourage
23 >> or allow in the future.
24 >
25 > Here's my quick review of the remaining commits (newest first):
26
27 Thanks!
28
29 > 31923f4 portage.package.ebuild.config.config.__init__(): Skip some warnings for Portage Python scripts called in ebuild environment.
30 > 7853950 Delete support for PORTDIR and PORTDIR_OVERLAY from make.conf and environment.
31
32 Before dropping PORTDIR and PORTDIR_OVERLAY, we need deprecation
33 warnings for a couple of years in advance.
34
35 > e7d95cb portage.repository.config.RepoConfig: Support location with trailing whitespace by using quoting.
36
37 This one might be okay. Did it really break anything?
38
39 > Those three already reverted.
40 >
41 >
42 > 8036223 _emerge.depgraph.depgraph._select_files(): Update message.
43 >
44 > Can probably be left, it's updating messages for repos.conf which is still valid.
45
46 Looks good.
47
48 > 9716f8a emirrordist: Delete support for deprecated --portdir and --portdir-overlay options.
49 > 2d40eb4 egencache: Delete support for deprecated --portdir and --portdir-overlay options.
50 >
51 > Not sure. Maybe something relies on this.
52
53 I don't care either way. Note that these options have triggered
54 deprecation warnings since before portage-2.2.0:
55
56 https://gitweb.gentoo.org/proj/portage.git/commit/?id=92fa6a1e1fcc92f2ad8ce8896c4ce3ec39477485
57 https://gitweb.gentoo.org/proj/portage.git/commit/?id=ab7d606eb6f66004a63c9406cf9cf87b352f6d01
58
59 > fb4d1f4 ebuild: Rename some variables.
60 >
61 > I'd keep it, doesn't hurt anything and the new names are more readable than 'myrepo' ;-).
62
63 Looks good.
64
65 > 9e104c4 ebuild: Set PORTAGE_REPOSITORIES instead of deprecated PORTDIR_OVERLAY.
66 >
67 > Kill it as relying on weirdo PORTAGE_REPOSITORIES invention.
68
69 I think this one is mostly okay, since PORTAGE_REPOSITORIES has been
70 supported for some time, and it would be nice to eliminate internal
71 usage for PORTDIR_OVERLAY.
72
73 However, this patch relies on the _read_repo_name method added in
74 2cde1f6. When we revert 2cde1f6, we can also change this code to use the
75 RepoConfig._read_valid_repo_name staticmethod that was removed in 2cde1f6.
76
77 > 3917544 bin/socks5-server.py: Fix DeprecationWarning with Python >=3.4.4.
78 >
79 > This one looks good, and even the commit message is sane.
80
81 Looks good.
82
83 > 2cde1f6 portage.repository.config: Clean reading of repository names and drop support for repositories with missing or invalid names.
84 >
85 > I'd revert it, it's a breaking change.
86
87 I think this is too much at once, so we should revert it.
88
89 As a first step in the direction that this patch is going, we could
90 remove the special case for /usr/local/portage from the repo_name_check
91 functions, so that people will start getting warnings for a missing
92 repo_name there.
93
94 > 1064765 portage.repository.config.RepoConfig: Delete user_location attribute and consistently use location attribute everywhere.
95 >
96 > I think we can keep this if it doesn't break anything. I didn't hear
97 > about this attribute before, so I suggest Zac reviews this.
98
99 repo.user_location is the original location specified in repos.conf, and
100 repo.location == os.path.realpath(repo.user_location)
101
102 So, repo.user_location can differ if the path contains any symlinks.
103
104 Is there any value in hiding the symlink indirection in repository paths
105 shown in output like emerge --info? If not, then the change is fine as
106 long as there are no external consumers of this API. I think there is
107 very low probability of there being external consumers.
108
109 > 48c2af4 Respect PYTHONDONTWRITEBYTECODE in test suite.
110 >
111 > I don't mind either way. But can't we make this simpler?
112
113 Looks good.
114
115 We can avoid code duplication if we add an environment setup function
116 for all the tests to share, but that can come in a later patch.
117
118 > 528dc7c portage.package.ebuild.fetch.fetch(): Clean setting of variables.
119 >
120 > Purely stylistic change.
121
122 I don't mind either way.
123
124 > 10cccf7 Support environmental variables overriding parts of configuration of repositories.
125 >
126 > Kill this ugly thing with a lot of fire. This is so wrong you can't get
127 > much worse.
128
129 I don't like this mainly because variables of the form
130 PORTAGE_REPOSITORY:${repository_name}:${attribute} cannot be exported in
131 bash:
132
133 $ export foo:bar=baz
134 bash: export: `foo:bar=baz': not a valid identifier
135
136 >
137 > 39d81c5 portage.package.ebuild.config.config.__getitem__(): Partially drop backward compatibility for nonexistent keys.
138 >
139 > Maybe keep it but needs someone smarter than me to review.
140
141 Looks good, except the last hunk seems redundant because "for x in self"
142 should only yield valid keys:
143
144 @@ -2697,7 +2714,9 @@ class config(object):
145 for x in self:
146 if x in environ_filter:
147 continue
148 - myvalue = self[x]
149 + myvalue = self.get(x)
150 + if myvalue is None:
151 + continue
152
153
154 > 4f25fa6 ebuild: Move imports to the top.
155 > 5ea789a portage.package.ebuild._config.LicenseManager.LicenseManager._getPkgAcceptLicense(): Fix typo in call to hasattr().
156 >
157 > Makes sense.
158
159 Looks good.
160
161 > 3ffdbbe ebuild: Do not catch unexpected KeyErrors from aux_get().
162 >
163 > Maybe. Need others to confirm.
164
165 Looks good. This will prevent an unexpected KeyError from being
166 silently/confusingly swallowed.
167
168 > b8da04b portageq envvar: Return 1 for any nonexistent variable.
169 >
170 > Makes sense.
171
172 This might break compatibility for some scripts calling portageq envvar,
173 and I think the utility of this change is questionable, since callers
174 will typically have to check if the result is non-empty anyway. Perhaps
175 it should return 1 if _none_ of the specified variables are defined?
176
177 > 53a0b63 _emerge.actions.getgccversion(): Work with chost=None and with no explicit chost.
178 >
179 > Probably makes sense, needs extra review.
180
181 Looks good.
182
183 > 628aa10 portage.sync.modules.cvs.CheckCVSConfig.check_cvs_repo(): Fix "KeyError: 'sync-cvs-repo'".
184 >
185 > Makes sense.
186
187 Looks good.
188
189 > f05056c portage.repository.config.RepoConfigLoader._parse(): Delete unused portdir parametre.
190 > 041fc70 portage.repository.config.RepoConfigLoader._add_repositories(): Delete unused ignored_location_map parametre.
191 > c1a2714 portage.repository.config.RepoConfigLoader._parse(): Delete unused ignored_map and ignored_location_map parametres.
192 >
193 > Those all make sense.
194
195 Looks good.
196
197 --
198 Thanks,
199 Zac

Replies