Bugzilla – Bug 1952
optional dependency fails to cause package upgrade when needed
Last modified: 2009-04-24 13:39:15 UTC
You need to log in before you can comment on or make changes to this bug.
Consider the following packages: a@1: set name=pkg.name value="package a@1" a@2: set name=pkg.name value="package a@2" depend fmri=pkg:/b@2 type=optional b@1: set name=pkg.name value="package b@1" depend fmri=pkg:/a@1 type=require b@2: set name=pkg.name value="package b@2" depend fmri=pkg:/a@1 type=require Create a repository: $ pkg image-create -U -a test=http://localhost:10000 myimage $ cd myimage Then install a@1 and b@1 $ pkg install a@1 b@1 $ pkg list NAME (AUTHORITY) VERSION STATE UFIX a 1 installed u--- b 1 installed u--- Now install a@2. This should cause an update of b to version 2. $ pkg install a@2 PHASE ACTIONS Update Phase 2/2 Install Phase 1/1 $ pkg list NAME (AUTHORITY) VERSION STATE UFIX a 2 installed u--- b 1 installed u--- Note that package b was not upgraded to version 2.
Here is another example that looks related. In this case I have two packages "base" and "p". "base" has an optional dependency on the 2.0 version of "p": add depend fmri=pkg:/p@2 type=optional But I'm allowed to install "base" even if I only have the 1.0 version of "p" already installed: $ pkg list -a NAME (AUTHORITY) VERSION STATE UFIX base 1-0 known ---- p 1.0-0 installed ---- $ pkg install base PHASE ACTIONS Install Phase 5/5 $ pkg list -a NAME (AUTHORITY) VERSION STATE UFIX base 1-0 installed ---- p 1.0-0 installed ----
More an API issue than a CLI issue.
*** Bug 6018 has been marked as a duplicate of this bug. ***
Looks like this got fixed somewhere along the way.
I confirmed that I'm seeing this work too in the version of pkg(5) in build 111.