1 |
On Thu, 14 Jan 2016 07:28:43 -0500 |
2 |
Rich Freeman <rich0@g.o> wrote: |
3 |
|
4 |
> On Tue, Jan 12, 2016 at 1:13 PM, Ulrich Mueller <ulm@g.o> wrote: |
5 |
> > |
6 |
> > Therefore, we could use the opportunity to add some other features. |
7 |
> > So far, this includes: |
8 |
> > |
9 |
> |
10 |
> I don't have a solution for this in mind, but I do see a problem that |
11 |
> could use a solution with our current approach to news in our stable |
12 |
> and unstable branches. |
13 |
> |
14 |
> Using the current criteria we have for displaying news items it is |
15 |
> very hard to prepare a news item that is displayed at an appropriate |
16 |
> time for both stable and unstable users of a package. Either the |
17 |
> unstable users don't get the news item at all, or everybody gets it at |
18 |
> the same time. Then stable users end up getting confused and |
19 |
> eventually forgetting about the notice, only to be hit with the update |
20 |
> after a significant time lag (it could be a year or more in some |
21 |
> cases) without any advance news. |
22 |
|
23 |
I was going to speak about this, and you beat me up to it... |
24 |
|
25 |
> One way to do this (and I'm certainly open to others) is a |
26 |
> Display-If-Installable header which takes a keyword string and an atom |
27 |
> (typically a specific PV). The package manager would determine if a |
28 |
> package with that keyword string and PV would be accepted or not based |
29 |
> on the user's configuration, and if so display the news. So, if the |
30 |
> string "~amd64 ~x86", =www-client/apache-2.4.19 were passed, users |
31 |
> running ~arch would generally get the message, as would a user running |
32 |
> stable but with <www-client/apache-2.5 in their package.keywords, but |
33 |
> not a user running stable with <www-client/apache-2.4.19 in their |
34 |
> package.keywords. If a user already was running |
35 |
> www-client/apache-2.4.21 the news would not display since the package |
36 |
> manager wouldn't attempt to install 2.4.19 if it showed up in the tree |
37 |
> (I'm open to argument as to whether it should show up if 2.4.19 is |
38 |
> already installed as there are pros and cons here). Note that this is |
39 |
> all hypothetical and the news should be triggered even if 2.4.19 isn't |
40 |
> in the tree yet, or if it is in the tree with a different set of |
41 |
> keywords. |
42 |
> |
43 |
> Now, this would still potentially require putting the same news item |
44 |
> into the tree multiple times to trigger it for the unstable/stable |
45 |
> users, but the key would be that the right users get the message when |
46 |
> this happens. Since the details of the news and what PV it applies to |
47 |
> might change between unstable/stable this is probably appropriate |
48 |
> anyway. Likewise if three archs are going stable now and two more a |
49 |
> year from now the news could be re-triggered just for those archs. |
50 |
> |
51 |
> The main downside to this I see is complexity - you can't just set up |
52 |
> one news item and have it do the right thing. The main advantage I |
53 |
> see to this is correctness - it handles both the case where keywords |
54 |
> are set in make.conf and package.keywords, because it provides enough |
55 |
> of a hint to the package manager about what is about to be introduced |
56 |
> into the tree. |
57 |
> |
58 |
> There could easily be a better solution for this. However, I think it |
59 |
> is a problem worth solving. |
60 |
|
61 |
...and I think you've found a pretty good solution to the problem. |
62 |
However, I get lost in your wall of text and I don't really see |
63 |
the problems you see. |
64 |
|
65 |
Based on your idea, this is how I'd do it: |
66 |
|
67 |
1. 'Display-If-Visible' that enables news items if given atom is |
68 |
visible for PM (i.e. in repo, with right keywords and not masked). |
69 |
I would avoid using 'Installable' as that could get confusing wrt |
70 |
conflicts and so on. |
71 |
|
72 |
2. Combine that with 'Display-If-Installed' -- and we should be able to |
73 |
get somewhat sane behavior. |
74 |
|
75 |
For example, for foo-1.0 to -2.0 upgrade notes, we'd do: |
76 |
|
77 |
Display-if-installed: <foo-2.0 |
78 |
Display-if-visible: >=foo-2.0 |
79 |
|
80 |
which would basically mean that all people having old foo installed |
81 |
would get the item as soon as they foo-2.0 becomes visible to them. |
82 |
But people installing straight 2.0 without previous versions don't get |
83 |
the item. |
84 |
|
85 |
We could also do: |
86 |
|
87 |
Display-if-installed: foo |
88 |
Display-if-visible: >=foo-2.0 |
89 |
|
90 |
which would cause the item to be displayed to both people who have old |
91 |
foo installed and can upgrade, or installed 2.0 directly. |
92 |
|
93 |
-- |
94 |
Best regards, |
95 |
Michał Górny |
96 |
<http://dev.gentoo.org/~mgorny/> |