Hi everybody,
While packaging in Solaris, I came across the following problem. But first some context.
In our company I'm packaging regularly a handfull of software packages (which contain mainly shell scripts for different purposes), this job I want to automize sooner or later. Each time, a colleague releases an update of a shell script, I will repackage the corresponding selfmade IPS package.
Doing so, one of the steps is, to identify package dependencies (using pkgdepend generate...) and to resolve them (using pkgdepend resolve...). The results can be found at the end of the results file of this step, in form of package dependency statements like these:
depend fmri=pkg:/shell/bash@4.4.19.19-0.175.3.33.0.1.0 type=require
depend fmri=pkg:/system/core-os@0.5.11-0.175.3.36.0.8.0 type=require
The problem is the exact constraint to the package version of the package "bash" or "core-os". I understand, that for many cases this is needed, but in this case an older version of the bash package or the core-os package would be sufficient (or rather no version at all). Why? Because, when Solaris 11.3 SRU 33 was the current SRU and I was packaging on my already patched packaging server, this dependency (depend fmri=pkg:/shell/bash@4.4.19.19-0.175.3.33.0.1.0 type=require) was identified. But only a subset of our servers was already patched with SRU 33. On all other servers I couldn't install my package, since the bash package, which was required, was not there. Soon after that, when all servers where updated to SRU 33, and SRU 36 was the latest SRU, while packaging, the new core-os package was identified as package dependency (depend fmri=pkg:/system/core-os@0.5.11-0.175.3.36.0.8.0 type=require). So my package could only be installed on servers with SRU 36, on servers with SRU 33 the installation failed. Which is in particular annoying, since the executed "pkg update" was meant to update the servers to SRU 36 and also to update the company script packages at the same time. I hope, I explained the problem well enough.
My solution since that is, to manually edit the packaging result files and to delete the version from the package dependency statements (if they contain dependency to very new packages):
depend fmri=pkg:/shell/bash@4.4.19.19-0.175.3.33.0.1.0 type=require
depend fmri=pkg:/system/core-os@0.5.11-0.175.3.36.0.8.0 type=require
Is there a way to tell pkgdepend to do this? Or should I write the statement manually already in the package manifest? Or how would you do this?
Thanks in advance and best regards,
Thomas.