On Mon, Sep 20, 2010 at 03:40:51PM -0700, Shawn Walker wrote:
> On 09/20/10 12:39 PM, Edward Pilatowicz wrote:
> >src/modules/client/pkg_solver.py
> >
> >- this isn't so pretty:
> > if da.attrs.get("root-image", "").lower() == "true":
> >
> > why not have the dependancy action class translate this property (if
> > present) into a boolean so you could just do:
> >
> > if da.attrs.get("root-image", ""):
>
> There's a significant amount of runtime overhead in parsing action
> data. Pushing the cost of comparison down to consumers of the data
> is cheaper than trying to enforce it during action parsing.
>
> That's why we avoid doing any transformation of action data unless
> absolutely necessary.
>
the bug report says that "root-image" will only be used when we have a
major flag day that requires multiple upgrades to get past it. given
how uncommon this option will be, and that it only applies to one
specific type of require dependancy, it seems like parsing it shouldn't
introduce much overhead.
if this level of overhead is still too much, is there any reason that
this parsing couldn't be delayed until the caller tries to access the
data?
one last thing that came to mind (and perhaps this is just because of my
lack of knowledge about pkg) is that if we're not parsing attributes
when loading actions, then when do we do validation? during package
publication or perhaps pkglint?
ed
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss