--- a/src/modules/client/imageplan.py Mon Nov 03 22:41:59 2008 +0000
+++ b/src/modules/client/imageplan.py Wed Nov 05 17:16:56 2008 -0800
@@ -305,11 +305,15 @@
# to already proposed pkgs or existing ones.
if not constraint.check_for_work(ref_fmri):
continue
+ # Apply any active optional/incorporation constraints
+ # from other packages
+ cf = self.image.constraints.apply_constraints_to_fmri(f)
+
# This will be the newest version of the specified
# dependency package, coming from the preferred
# authority, if it's available there.
- cf = self.image.inventory([ a.attrs["fmri"] ],
+ cf = self.image.inventory([ cf ],
all_known = True, preferred = True,
first_only = True).next()[0]
--- a/src/tests/cli/t_pkg_install.py Mon Nov 03 22:41:59 2008 +0000
+++ b/src/tests/cli/t_pkg_install.py Wed Nov 05 17:16:56 2008 -0800
@@ -569,6 +569,12 @@
close
"""
+ brass10 = """
+ open [email protected],5.11-0
+ add depend fmri=pkg:/bronze type=require
+ close
+ """
+
bronze10 = """
open [email protected],5.11-0
add dir mode=0755 owner=root group=bin path=/usr
@@ -789,6 +795,7 @@
self.pkgsend_bulk(durl, self.bronze10)
self.pkgsend_bulk(durl, self.bronze20)
self.pkgsend_bulk(durl, self.bronze30)
+ self.pkgsend_bulk(durl, self.brass10)
self.image_create(durl)
@@ -797,9 +804,10 @@
self.pkg("install [email protected]", exit=1)
# install package w/ dependencies that violate incorps
self.pkg("install [email protected]", exit=1)
- # ... setup w/ file that works
- self.pkg("install bronze")
- self.pkg("verify -v [email protected]")
+ # install package w/ unspecified dependency that pulls
+ # in bronze
+ self.pkg("install brass")
+ self.pkg("verify [email protected] [email protected]")
# attempt to install conflicting incorporation
self.pkg("install [email protected]", exit=1)