Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: Zac Medico <zmedico@g.o>
Cc: 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: Sun, 13 Dec 2015 12:58:33
Message-Id: 20151213135818.5b9ee577.mgorny@gentoo.org
In Reply to: Re: [gentoo-portage-dev] How do we want to deal with Arfrever's bunch of patches? by Zac Medico
1 On Sat, 12 Dec 2015 12:44:40 -0800
2 Zac Medico <zmedico@g.o> wrote:
3
4 > On 12/12/2015 06:50 AM, Michał Górny wrote:
5 > > On Sat, 12 Dec 2015 13:01:04 +0100
6 > > Alexander Berntsen <bernalex@g.o> wrote:
7 > >
8 > >> Friends,
9 > >>
10 > >> As I'm sure you've noticed, Arfrever pushed a bunch of unreviewed
11 > >> stuff. Michał reverted some of them as they were breaking changes in
12 > >> addition to being unreviewed (oh, and of course they don't follow the
13 > >> commit message format -- why would they). There's a bunch left.
14 > >>
15 > >> Do we want to cherry-pick Zac's patches (i.e. revert Arfrever's
16 > >> patches), and have him put them up for review as usual? It's a bit of
17 > >> a mess because of Zac's patches. If we go down this route it would
18 > >> likely be easiest for Zac to revert them, since he'll be the more
19 > >> confident regarding what to keep in the ensuing merge conflicts.
20 >
21 > Yeah, I'd be happy to do that.
22 >
23 > >> Arfrever asked that someone review the patches and keep them if they
24 > >> are OK, and revert only the ones that are problematic. I think this
25 > >> would be OK for now, but obviously not something we want to encourage
26 > >> or allow in the future.
27 > >
28 > > Here's my quick review of the remaining commits (newest first):
29 >
30 > Thanks!
31 >
32 > > 31923f4 portage.package.ebuild.config.config.__init__(): Skip some warnings for Portage Python scripts called in ebuild environment.
33 > > 7853950 Delete support for PORTDIR and PORTDIR_OVERLAY from make.conf and environment.
34 >
35 > Before dropping PORTDIR and PORTDIR_OVERLAY, we need deprecation
36 > warnings for a couple of years in advance.
37 >
38 > > e7d95cb portage.repository.config.RepoConfig: Support location with trailing whitespace by using quoting.
39 >
40 > This one might be okay. Did it really break anything?
41
42 I don't know. I reverted the whole bunch of unreviewed stuff then,
43 better safe than sorry. Furthermore, it looks suspicious, so I'd rather
44 have that reviewed properly rather than post-factum.
45
46 > > fb4d1f4 ebuild: Rename some variables.
47 > >
48 > > I'd keep it, doesn't hurt anything and the new names are more readable than 'myrepo' ;-).
49 >
50 > Looks good.
51
52 I had to revert it because it relies on the previous commit. I'd rather
53 have it reintroduced cleanly rather than having fixes mixed with
54 reverts, or partially broken states.
55
56 > > 9e104c4 ebuild: Set PORTAGE_REPOSITORIES instead of deprecated PORTDIR_OVERLAY.
57 > >
58 > > Kill it as relying on weirdo PORTAGE_REPOSITORIES invention.
59 >
60 > I think this one is mostly okay, since PORTAGE_REPOSITORIES has been
61 > supported for some time, and it would be nice to eliminate internal
62 > usage for PORTDIR_OVERLAY.
63 >
64 > However, this patch relies on the _read_repo_name method added in
65 > 2cde1f6. When we revert 2cde1f6, we can also change this code to use the
66 > RepoConfig._read_valid_repo_name staticmethod that was removed in 2cde1f6.
67
68 I have reverted it for this reason. As above, we can reintroduce it
69 when it's fixed to work with the resulting code.
70
71 > > 2cde1f6 portage.repository.config: Clean reading of repository names and drop support for repositories with missing or invalid names.
72 > >
73 > > I'd revert it, it's a breaking change.
74 >
75 > I think this is too much at once, so we should revert it.
76 >
77 > As a first step in the direction that this patch is going, we could
78 > remove the special case for /usr/local/portage from the repo_name_check
79 > functions, so that people will start getting warnings for a missing
80 > repo_name there.
81
82 Reverted. We can proceed from here.
83
84 > > 10cccf7 Support environmental variables overriding parts of configuration of repositories.
85 > >
86 > > Kill this ugly thing with a lot of fire. This is so wrong you can't get
87 > > much worse.
88 >
89 > I don't like this mainly because variables of the form
90 > PORTAGE_REPOSITORY:${repository_name}:${attribute} cannot be exported in
91 > bash:
92 >
93 > $ export foo:bar=baz
94 > bash: export: `foo:bar=baz': not a valid identifier
95
96 Reverted.
97
98 > > 39d81c5 portage.package.ebuild.config.config.__getitem__(): Partially drop backward compatibility for nonexistent keys.
99 > >
100 > > Maybe keep it but needs someone smarter than me to review.
101 >
102 > Looks good, except the last hunk seems redundant because "for x in self"
103 > should only yield valid keys:
104 >
105 > @@ -2697,7 +2714,9 @@ class config(object):
106 > for x in self:
107 > if x in environ_filter:
108 > continue
109 > - myvalue = self[x]
110 > + myvalue = self.get(x)
111 > + if myvalue is None:
112 > + continue
113
114 Could you fix it then, please?
115
116 I've left all the other unmentioned commits.
117
118 --
119 Best regards,
120 Michał Górny
121 <http://dev.gentoo.org/~mgorny/>

Replies