On 06/ 1/12 01:35 PM, Brock Pytlik wrote:
On 05/31/12 18:30, Tim Foster wrote:
I've added that, though it seems weird that we'd create an empty
SMFManifestDependency that doesn't specify either a string or a tuple
for a path?
I agree, personally I'd throw an exception if we don't get a string or
tuple.
That sounds like a better solution.
Testing:
What happens if a file that a service depends on is delivered under only
1 of 2 variant values?
[snip]
Now, there is an edge-case which we aren't handling properly.
If rsyslog.xml delivers to a zone and system-log.xml delivers to both
global and non-global zones, but the rest of the rsyslog package can
appear in a global zone, then we get:
depend fmri=pkg:/[email protected] type=require
variant.opensolaris.zone=nonglobal
depend fmri=pkg:/[email protected] fmri=pkg:/[email protected] type=require-any
variant.opensolaris.zone=global
That last require-any dependency is wrong, if rsyslog was installed in
the global zone (without the SMF manifest) and old-syslog wasn't, then
we've incorrectly satisfied the dependency.
Och, I screwed up my test data - we're doing exactly the right thing and
get the following dependencies after resolution:
depend fmri=pkg:/[email protected] type=require variant.opensolaris.zone=global
depend fmri=pkg:/[email protected] fmri=pkg:/[email protected] type=require-any
variant.opensolaris.zone=nonglobal
Huh, I guess I haven't tested for this case. I'm a bit surprised it
behaves (on other forms of dependencies) as you've described, but since
I haven't tested it ...
I'll look at fixing that up then and hopefully it won't get too painful.
Nope, my fault - this is working properly.
cheers,
tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss