[email protected] wrote:
webrev:
http://cr.opensolaris.org/~swalker/pkg-8135/

I am have also added an 'ordered' boolean parameter to image.inventory to allow callers to determine whether matches should be sorted by package name before being returned which saves a few more seconds for the above case.

The code change looks okay to me, but I'm not entirely sure I understand
when the client wants the inventory sorted versus unsorted.  Can you
explain this some more?  If I were adding a new image method and had to
call inventory, when would I want the results to be sorted instead of
returned in any order?

pkg list, etc. expect the results in alphabetical order for obvious reasons.

Because this function yields it results as it generates them, it's important that the catalog is sorted first for some uses before returning results.

However, when we are using the inventory function internally just to find packages to install, etc. the order of the names isn't important; only the order of the versions returned (descending).

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

Reply via email to