On Tue, Mar 15, 2016 at 3:51 PM, Ben Summers <b...@bens.me.uk> wrote:
> > > On 15 Mar 2016, at 15:48, Ben Summers <b...@bens.me.uk> wrote: > > > > > >> On 15 Mar 2016, at 15:40, Peter Tribble <peter.trib...@gmail.com> > wrote: > >> > >> Currently having a minor issue building software. > >> > >> As mentioned yesterday, I'm building on a slightly older image, so that > I > >> know that any binaries I generate will run on all systems (which are > newer). > >> > >> The snag is that the install media doesn't have the headers. And if I > >> > >> pkg install system/header > >> > >> then it installs the latest version in the repo. It doesn't look like > there > >> are any versioned constraints to tie the version of the header package > >> to the installed libraries. > > > > 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? > > > > > http://pkg.omniti.com/omnios/r151014/en/advanced_search.shtml?token=system%2Fheader&show=p&sav=1&rpp=100&v=11%252C11-0.151014 > > (scroll down to see the interesting packages) > > > > pkg install system/header@0.5.11,5.11-0.151014:20150818T161043Z > > > > All a bit manual of course. > > > Actually I have a sneaking suspicion that this is what you meant by > "manual". > So what I'm actually using is the following, using a ksh associative array to map the installed version of the system/library package to the desired version of the system/header package. (It's a timestamp, so you can see that the two packages are only a few seconds apart.) typeset -A headermap headermap[20150402T175242Z]=20150402T175234Z headermap[20150417T182440Z]=20150417T182431Z headermap[20150727T054701Z]=20150727T054659Z headermap[20150818T161046Z]=20150818T161043Z headermap[20150913T201600Z]=20150913T201558Z headermap[20150914T195009Z]=20150914T195007Z headermap[20150929T225339Z]=20150929T225336Z headermap[20151112T210053Z]=20151112T210050Z if [ ! -f /usr/include/stdio.h ]; then SLVER=`pkg info system/library | grep FMRI: | awk -F: '{print $NF}'` RELVER=`pkg info system/library | grep FMRI: | awk -F@ '{print $2}' | awk -F: '{print $1}'` SHVER=${headermap[$SLVER]} if [ -n "$SHVER" ]; then pfexec pkg install pkg:/system/header@${RELVER}:${SHVER} else pfexec pkg install pkg:/system/header fi fi -- -Peter Tribble http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________ OmniOS-discuss mailing list OmniOS-discuss@lists.omniti.com http://lists.omniti.com/mailman/listinfo/omnios-discuss