On 06/16/11 15:36, Brock Pytlik wrote:
On 06/16/11 15:34, Shawn Walker wrote:
On 06/16/11 15:16, Brock Pytlik wrote:
On 06/16/11 11:52, Danek Duvall wrote:
...
- match_user_stems(): The changes here feel awkward, though I'd
appreciate Shawn's input on it, too. I think rather than put in a
bunch of booleans to alter the behavior of the method, you should just
do the most general thing, and let the caller deal with the result.
For instance, always return the full dict. For non-matching patterns,
perhaps the return dict could map those patterns to None, or empty
lists, or perhaps a second return value would be better. I feel like
raising an exception for these sorts of "problems" isn't really the
right interface. And maybe 'universe' might have more utility as a
catalog object?
I explicitly didn't want to make universe a catalog object. Our catalog
objects are, as far as I can tell, fairly tightly coupled to our on disk
storage and the four pieces of a catalog, etc... Since all we're using
the catalog for here is to produce a list of appropriate packages to
match against, I think providing a way to pass in exactly that is the
right interface.

Actually, I've made certain that Catalog objects can be used
completely in-memory. Just create one without specifying a meta_root.
Huh. Ok. I still believe the parameter as specified is preferable to a
catalog object in this context.

For your use case, yes, the nice thing about being able to provide a catalog object is that you can use existing catalogs as-is.

However, I'm indifferent on this point.

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

Reply via email to