On Mon, 2011-02-14 at 19:19 -0700, Mark J. Nelson wrote:
> On 02/13/11 09:04 PM, Tim Foster wrote:
> > http://cr.opensolaris.org/~timf/pkgdep-python-webrev-2
> > http://cr.opensolaris.org/~timf/pkgdep-python-webrev-0-vs-2
> 
> src/modules/flavor/base.py:
> 
> 63-64: I know I requested this change, but I might still be unclear on
> this.  You can set pkg.depend.runpath on a manifest, and/or on an
> action.  If set for an action, it completely overrides the manifest
> setting, but PD_DEFAULT_RUNPATH doesn't get expanded on a per-manifest
> basis because its value is actually flavor-dependent?

That's correct.

>   So the error
> could stem from the setting of either a manifest attribute or an action
> attribute, but it will always be detected and reported per-action?

Yes.  The code fails fast - if we encounter any duplicate
$PKGDEPEND_RUNPATH tokens for any action, whether that attribute was
inherited from a manifest-set value, or whether it was set on the action
itself, we stop processing actions in that manifest immediately,
reporting the error once.

> 357-374: Factoring this out is nicer than implementing it for each
> caller, but doesn't address my earlier question, which (though perhaps
> not well phrased) was really about performance.  The callers of
> insert_default_runpath() must still calculate the default runpath, which
> I had assumed to be expensive, since it's done on a per-action basis.

Ok, though it does have to be done per-action (the elf binaries can set
any runpath they like)

> On a related note, is there a performance difference between simply
> attempting to get the index PD_DEFAULT_RUNPATH and handling the
> resulting ValueError, versus testing for PD_DEFAULT_RUNPATH in
> run_paths?  I'm not insistent on changes here, I'm just sensitive to the
> fact that we're calling pkgdepend generate a lot (800?) of times in the
> OS/Net pkg build, and it would be a shame to slow it down needlessly.

I haven't done measurements yet, but this would only apply to the few
cases in ON where we're adding pkg.depend.runpath attributes to actions,
since we guard with 'if run_paths', where run_paths is the value passed
in by the caller, empty for the vast majority of actions in ON at least.

   228          if run_paths:
   229                  # add our detected runpaths into the user-supplied one 
(if any)
   230                  rp = base.insert_default_runpath(rp, run_paths)

That said, I'll run a few 'dmake gendeps' both with and without this
entire changeset to verify that I'm not slowing things down
significantly.  I'll let you know if it looks like I am.

        cheers,
                        tim

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

Reply via email to