<div dir="ltr">On Tue, Mar 15, 2016 at 3:51 PM, Ben Summers <span dir="ltr"><<a href="mailto:ben@bens.me.uk" target="_blank">ben@bens.me.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
> On 15 Mar 2016, at 15:48, Ben Summers <<a href="mailto:ben@bens.me.uk">ben@bens.me.uk</a>> wrote:<br>
><br>
><br>
>> On 15 Mar 2016, at 15:40, Peter Tribble <<a href="mailto:peter.tribble@gmail.com">peter.tribble@gmail.com</a>> wrote:<br>
>><br>
>> Currently having a minor issue building software.<br>
>><br>
>> As mentioned yesterday, I'm building on a slightly older image, so that I<br>
>> know that any binaries I generate will run on all systems (which are newer).<br>
>><br>
>> The snag is that the install media doesn't have the headers. And if I<br>
>><br>
>> pkg install system/header<br>
>><br>
>> then it installs the latest version in the repo. It doesn't look like there<br>
>> are any versioned constraints to tie the version of the header package<br>
>> to the installed libraries.<br>
><br>
> What if you choose the latest version as of the release date of the iso, and include the full version number in the pkg install command?<br>
><br>
> <a href="http://pkg.omniti.com/omnios/r151014/en/advanced_search.shtml?token=system%2Fheader&show=p&sav=1&rpp=100&v=11%252C11-0.151014" rel="noreferrer" target="_blank">http://pkg.omniti.com/omnios/r151014/en/advanced_search.shtml?token=system%2Fheader&show=p&sav=1&rpp=100&v=11%252C11-0.151014</a><br>
>   (scroll down to see the interesting packages)<br>
><br>
>   pkg install system/header@0.5.11,5.11-0.151014:20150818T161043Z<br>
><br>
> All a bit manual of course.<br>
<br>
<br>
</span>Actually I have a sneaking suspicion that this is what you meant by "manual".<br></blockquote><div><br></div><div>So what I'm actually using is the following, using a ksh associative array to</div></div><div>map the installed version of the system/library package to the desired version</div><div>of the system/header package. (It's a timestamp, so you can see that the two</div><div>packages are only a few seconds apart.)</div><div><br></div><div><div>typeset -A headermap</div><div>headermap[20150402T175242Z]=20150402T175234Z</div><div>headermap[20150417T182440Z]=20150417T182431Z</div><div>headermap[20150727T054701Z]=20150727T054659Z</div><div>headermap[20150818T161046Z]=20150818T161043Z</div><div>headermap[20150913T201600Z]=20150913T201558Z</div><div>headermap[20150914T195009Z]=20150914T195007Z</div><div>headermap[20150929T225339Z]=20150929T225336Z</div><div>headermap[20151112T210053Z]=20151112T210050Z</div><div><br></div><div>if [ ! -f /usr/include/stdio.h ]; then</div><div><span class="" style="white-space:pre">       </span>SLVER=`pkg info system/library | grep FMRI: | awk -F: '{print $NF}'`</div><div><span class="" style="white-space:pre">       </span>RELVER=`pkg info system/library | grep FMRI: | awk -F@ '{print $2}' | awk -F: '{print $1}'`</div><div><span class="" style="white-space:pre">        </span>SHVER=${headermap[$SLVER]}</div><div><span class="" style="white-space:pre"> </span>if [ -n "$SHVER" ]; then</div><div><span class="" style="white-space:pre">         </span>pfexec pkg install pkg:/system/header@${RELVER}:${SHVER}</div><div><span class="" style="white-space:pre">   </span>else</div><div><span class="" style="white-space:pre">               </span>pfexec pkg install pkg:/system/header</div><div><span class="" style="white-space:pre">      </span>fi</div><div>fi</div></div><div><br></div>-- <br><div class="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>