On 05/29/12 21:40, Tim Foster wrote:
hi there,

I've got a change here that allows SMF manifests which contain 'require_all' dependencies that specify SMF services as their FMRIs to get converted to 'require-any' pkg(5) dependencies via pkgdepend(1) in cases where several files deliver instances of that service.

(yes, I know that sounds odd - an SMF "require_all" somehow translating to a "require-any" pkg(5) dependency.

In SMF, a "require_all" dependency specifying a service FMRI can be satisfied by at least one instance of that service, so pkg(5) needs to ensure that a package delivering at least one of these instances is installed)

https://cr.opensolaris.org/action/browse/pkg/timf/pkgdep-smf-req-any

Comments would be most welcome,

    cheers,
            tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
smf_manifest.py:
58-62: nit: could this comment be located inside the elif block? Maybe it's just a personal peeve of mine, but having the comments where they are makes the code hard to read to my eyes.

54,63: There needs to be an else clause to this if/elif, or we need to set default values for base_names and paths I think.

307: nit Could you change line 307 so that it says "service FMRI, not an instance FMRI, ..."?

310-316: I think this error message could be a little clearer and nicer to the user. First, since manifests is a list, the error message the user sees is going to see the python representation of a list ie: '[foo, bar, baz ...]' without any linebreaks. While the idea of using locals() like this is cute, i think it often isn't what we want because it doesn't format the error info nicely for the user. The colon on line 314 also seems a bit out of place to me, at least with how I'm reading it in my head. Perhaps a period and then start another sentence? I think it's also worth explaining to the user why multiple files can't satisfy a dependency in this situation since they're allowed in other situations.

Testing:
What happens if a file that a service depends on is delivered under only 1 of 2 variant values?

Thanks,
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to