On 04/ 7/11 04:27 PM, Shawn Walker wrote:
On 04/ 7/11 12:14 PM, Brock Pytlik wrote:
Webrev:
http://cr.opensolaris.org/~bpytlik/ips-18130-v1/

Bug:
18130 pkgdepend doesn't simplify variants where it should

This webrev changes how pkgdep resolve combines variants. Instead of
only merging dependencies where one is a variant subset of the other, it
merges all variants of a dependency together, then tries its best to
simplify the combinations. The simplest place this makes an improvement
is that before, it would have reported a dependency under sparc, and a
dependency under i386. Now those will be combined if it's possible so
only one, unvarianted, depenedency will exist.

src/modules/variant.py:
line 383-387: It'd be more efficient to move this function above the while block declaration and add 'variant_name' as a parameter. python has weird scoping behaviour for nested function definitions.
I agree it'd be more efficient, but then I'd need to deal with python's lambda, and I've found that to generally be an unpleasant place to be, and I'm not sure that would actually be any more efficient, since we'd still be building a function on each iteration.

  lines 393, 401, 409, 416, 424: a newline before these comments would
    help readability
ok

  line 428: seems like could add a 'continue' after this and that would
    allow you to de-indent lines 429-447, which would also help
    readability a bit
true, I'll do that.

The changes make sense to me.

Thanks for taking a look.
Brock

-Shawn

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

Reply via email to