<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 20, 2017 at 10:28 PM, Dan McDonald <span dir="ltr"><<a href="mailto:danmcd@omniti.com" target="_blank">danmcd@omniti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">EXECUTIVE SUMMARY:  As it stands, pkg(5) in bloody changes behavior from 014-020 to something different. It also fixes a shortcoming in 014-020. Do we go completely with the new behavior and document it? Or do we minimize least-surprise at the risk of introducing bugs? I'm leaning toward the second choice, modulo my pkg5 test suite experiences.  Opinions, esp. from LTS folks, needed.<br>
<br>
.  .  .  .  .  .  .  .<br>
<br>
I updated pkg5 during this bloody to handle Python2.7.  That worked all well and good, but had a side-effect I didn't see (and neither did a lot of bloody users, apparently).<br>
<br>
So here's what happens today, on 014-020 pkg(5) for global zone invocations:<br>
<br>
pkg update <pkg><br>
- Updates <pkg> on global zone.  No others, REGARDLESS of linked-image or not.<br></blockquote><div><br></div><div>That behaviour initially surprised me, but once you understand that all<br></div><div>it's doing in the linked zone is ensuring package compatibility then it<br></div><div>makes sense - the currently installed version of the package clearly has to<br>be compatible (else it couldn't be present) so there's no need to update it.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
pkg update<br>
- Update all pkgs on global zone AND on any linked-image zones.<br>
<br>
<br>
Starting with the Python2.7 integration, this behavior changed:<br>
<br>
pkg update <pkg><br>
- Same as before<br>
<br>
pkg update<br>
- Only updates global zone, and linked-image "If needs sync", where "needs sync" is not well defined (may need a property inside a package itself).<br></blockquote><div><br></div><div>That sounds like there's a bug somewhere. <br><br></div><div>If you update the OS in the global zone, with a change that breaks<br></div><div>kernel<->libc compatibility, will libc get updated in an lipkg zone?<br><br></div><div>The answer has to be yes, clearly.<br></div><div><br>IPS relies heavily on package constraints, so if that's not happening<br></div><div>then either pkg(5) is broken or package versions aren't adequately<br>constrained, I guess.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
pkg update -r <pkg><br>
- Updates <pkg> on global zone AND on linked-image zones.<br>
<br>
pkg update -r<br>
- Behaves like "pkg update" on 014-020, updates all pkgs on global and linked-image zones.<br>
<br>
<br>
<br>
The "-r" as an option - and you can specify zones with -z or zones to exclude with -Z - is new from Oracle with the wad of updates OpenIndiana pulled in to get Python2.7 support.  And I quote from the pkg(1) man page you can see on bloody today:<br>
<br>
          -r<br>
<br>
              Run this operation in the global zone and also in all installed<br>
              solaris branded non-global zones. The effect on the non-global<br>
              zone is similar to logging into each non-global zone and<br>
              running the command directly. Without this option, when you run<br>
              pkg commands in the global zone, non-global zones are modified<br>
              only to the extent required to keep them compatible with the<br>
              global zone. With this option, the pkg operation is applied to<br>
              all installed non-global zones except as limited by the -z and<br>
              -Z options. Zones that are excluded by the -z and -Z options<br>
              might still be modified if updates are required to keep them in<br>
              sync with the global zone.<br>
<br>
Because of the least-suprise violation of new "pkg update" behavior, I'm wondering if we should make "-r" implicit.  I'm working right now on an implicit "-r" solution, but am running into some problems with the pkg5 test suite I still need to sort out.<br></blockquote><div><br></div><div>FWIW, when updating a single package I have a script that effectively<br></div><div>does -r by doing a zlogin into each zone. So 'pkg update -r' is a good<br></div><div>thing.<br><br></div><div>I'm not sure I would make -r the default. Apart from the existence of<br></div><div>cases where you explicitly *don't* want to update zones, it makes you<br></div><div>incompatible wit the rest of the IPS world.<br><br></div><div>However, the fact that a bare 'pkg update' could lead to broken linked<br>zones does concern me, and I suspect that you're going to have to look<br></div><div>at whether you need to tighten up package and incorporate dependencies.<br></div><div> </div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">-Peter Tribble<br><a href="http://www.petertribble.co.uk/" target="_blank">http://www.petertribble.co.uk/</a> - <a href="http://ptribble.blogspot.com/" target="_blank">http://ptribble.blogspot.com/</a></div>
</div></div>