Gentoo Archives: gentoo-dev

From: konsolebox <konsolebox@×××××.com>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o, pms-bugs@g.o
Subject: Re: [gentoo-dev] RFC: Future EAPI version operator changes
Date: Wed, 09 Nov 2016 11:51:15
Message-Id: CAJnmqwZDNc-duT0jq++mt3p+of+hmT_kPr5dNsbZNCVSJdWrKg@mail.gmail.com
In Reply to: Re: [gentoo-dev] RFC: Future EAPI version operator changes by "Michał Górny"
1 On Wed, Nov 9, 2016 at 7:12 PM, Michał Górny <mgorny@g.o> wrote:
2 >> On Wed, Nov 9, 2016 at 3:36 PM, Michał Górny <mgorny@g.o> wrote:
3 >> >> dev-foo/bar(:* :=) renders :* meaningless since := restricts any
4 >> >> installed runtime dependency's slot and subslot to be currently
5 >> >> available. It's still algorithmically correct.
6 >> >
7 >> > 'any AND newest'? Why would you ever do that? The only purpose for :*
8 >> > is to disable warnings on missing slot specifications when package has
9 >> > multiple slots.
10 >>
11 >> I hope you're only arguing against the misuse, and not about whether
12 >> it's feasible when it comes to the implementation.
13 >>
14 >> But anyway, "newest" is not what's being said in ebuild(5):
15 >>
16 >> ":= Indicates that any slot value is acceptable. In addition,
17 >> for runtime dependencies, indicates that the package will break unless
18 >> a matching package with slot and sub-slot equal to the slot and
19 >> sub-slot of the best installed version at the time the package was
20 >> installed is available."
21 >
22 > I meant newest installed.
23
24 Ok, so do you think := can be used anywhere just like any other
25 conditional element?
26
27 >> >> dev-foo/bar:={:1.3 :1.4 :1.5} OR dev-foo/bar(:= {:1.3 :1.4 :1.5})
28 >> >> implies that the currently installed package's slot and subslot should
29 >> >> be available and that the version of the slot should be 1.3, 1.4, or
30 >> >> 1.5. The interpreter could read that condition checking from left to
31 >> >> right easily. Is the currently installed package's slot and subslot
32 >> >> currently available? If no, this condition renders false and the
33 >> >> currently installed package is invalid. If yes, we follow the next
34 >> >> condition. Is the slot version any of 1.3, 1.4, or 1.5? If yes, then
35 >> >> that condition yields true.
36 >> >
37 >> > I see a lot of added complexity here, for no benefit whatsoever.
38 >>
39 >> No, it's not complex at all as everything would just be packaged in
40 >> one logical code. I just had to explain detail by detail so I could
41 >> prove that it's doable.
42 >>
43 >> The current check-if-some-specific-element-comes-before-or-after-another
44 >> which propagates everywhere in every context of every different type
45 >> of conditional element being checked makes things more complex.
46 >
47 > I think you're forgetting the most important point here. Dependency
48 > specifications are not only used to check some installed package for
49 > match. They also need to make it possible to semi-reasonably pull
50 > in additional packages that could be used to satisfy the dependency.
51 >
52 > The more complex conditions you allow, the harder the task becomes for
53 > the PM and the slower Portage becomes (because it needs to consider
54 > more variants of a possible solution).
55
56 I still need to confirm things in a more technical manner, so I can't
57 make a reply about that for now.
58
59 > Slots are free-form strings by design. This has its uses, including
60 > named slots ('stable', 'testing'...), subslots representing SONAMEs of
61 > multiple libraries ('liba0-libb4')...
62
63 I see.
64
65 >> >> > How do we combine various order of data?
66 >> >>
67 >> >> I need specific example/detail on that, or perhaps I already have that
68 >> >> answered above.
69 >> >
70 >> > dev-foo/bar(:1.6 {>=3.4 :5[foo]} ([bar] <3.7))
71 >>
72 >> I'm yet to add opinion on allowing use flags to be used anywhere
73 >> besides outside a group and only once. But that looks doable,
74 >> although seems more complicated to implement, or at least heavier,
75 >> maybe. You should also correct that a bit:
76 >>
77 >> dev-foo/bar(:1.6 {>=3.4 (:5 [foo])} ([bar] <3.7))
78 >
79 > Why are you forcing whitespace in some contexts and not in other
80 > contexts? Does this mean the common case would look like:
81 >
82 > dev-foo/bar >= 1.4 :1.6 [bar]
83 >
84 > ?
85
86 Sorry, I misguessed. I thought you wanted :5 and [foo] to be used
87 together; that both items should be true.
88
89 >> > Yes, I am. In some cases, regexp is the only thing you have
90 >> > (e.g. in XSD). The major problem with current syntax is that you can't
91 >> > properly validate restrict="" in XSD because you'd have to
92 >> > backreference operator.
93 >>
94 >> I don't know XSD, but it's good if we can improve it as well so we can innovate.
95 >
96 > Err, are you talking Gentoo is supposed to request full FSM to be
97 > included in XML Schema? I honestly doubt standard bodies will seriously
98 > consider that.
99
100 I see. I can't comment much on that unfortunately.
101
102 >> >> > 3. Do we allow multiple occurrences of the same type of element? I'm specifically thinking of multiple disjoint USE dependency blocks.
103 >> >>
104 >> >> I'm sorry but I'm not sure what you mean there. I hope you can give an example.
105 >> >
106 >> > dev-foo/bar[foo][bar]
107 >>
108 >> Again, I never really thought about allowing the [use] block to be
109 >> more re-arrangeable in the sense that it can be used more than once
110 >> and that it can be allowed inside condition blocks, but so far it
111 >> really looks doable, and we could drop the restrictions. This would
112 >> be possible along with having everything changed to independent
113 >> conditional elements.
114 >
115 > 'I never really thought' is the core problem. When you want to change
116 > PMS, you really have to think about everything. Otherwise, you end up
117 > with screwups like := in || ().
118
119 Well I'm also the type who tries to consider everything, but this was
120 more of a blind spot, and a little bit of a different context
121 that you can't think about quickly.
122
123 I also just thought that everyone would feel conservative towards it,
124 so I was just being careful, but I actually like the idea of including
125 [use] blocks in the change.
126
127 --
128 konsolebox