<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; font-size: 13px; display: block; padding: 9.5px; margin: 0px 0px 10px; line-height: 14.3px; color: rgb(51, 51, 51); word-break: break-all; word-wrap: break-word; background-color: white; border: 0px; border-radius: 0px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">&gt; On Fri, 2018-06-15 at 17:59 -0700, Jeremy Puhlman wrote:
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; If ALTERNATIVE_&lt;pkg&gt; lists the same entry more then once, the</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; update-alternatives identical install and remove actions are added</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; for</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; each repeated entry. This is exhibited when you add meta-selinux, and</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; examine the busybox package, which installs every link twice because</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; it</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; alters the links to point to the shell replacements so selinux will</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; work</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; with them. This can generate warnings on do_rootfs about similarly</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; prioritized alternatives. Given that at this point in the processing</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; the addtions should always be identical there shouldn't be any good</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; reason to add them twice.</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; </span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; Signed-off-by: Jeremy Puhlman <a class="moz-txt-link-rfc2396E" href="mailto:jpuhlman@mvista.com">&lt;jpuhlman@mvista.com&gt;</a></span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt; ---</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt;  meta/classes/update-alternatives.bbclass | 4 ++++</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0);">&gt;&gt;  1 file changed, 4 insertions(+)</span>
&gt;
&gt; Shouldn't we detect and make this a fatal error in one of the other
&gt; sanity tests like we do for PACKAGES for example?

That is certainly one way to go, it would also require at least a fix to the selinux append(which is what I
did first), but I figured a more generalized fix would be more useful in the long run.

&gt;  Would there ever be a valid use case for duplicate entries here?

Given at this point in the code all the values are pretty much locked in, you can't really create links that are different, so
at least as the way the code is currently structured, there is no value in adding identical values twice as far as I can think
of.

With out any change, there does not appear to be any degradation in the on target alternatives function, in some cases it just generates
a number of "alternatives set at the same priority" warning messages during the image construction. In the PACKAGES case, I thought there
was actual real functional issues with duplicating values in package, which is why it was added. In this case the only real effect would
be cleaner alternatives files/post scripts and no warnings during image builds.

I am fine with either way, as I already have a fix up for the selinux append.

&gt;
&gt; Cheers,
&gt;
&gt; Richard


</pre>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Jeremy A. Puhlman
<a class="moz-txt-link-abbreviated" href="mailto:jpuhlman@mvista.com">jpuhlman@mvista.com</a>
</pre>
  </body>
</html>