johan...@sun.com wrote:
Brock,

On Mon, Aug 17, 2009 at 08:31:35PM -0700, Brock Pytlik wrote:
http://cr.opensolaris.org/~bpytlik/ips-10515-v1/

10515 search should support -o for output like pkg contents
10608 search should support -H option for output

Meta-comments from me this time.

I'm concerned about our use of valid_special_attrs, and related lists.
In general, it would be nice if we could filter on package attributes as
actions add them, without having to write code to do so.
I'm confused by your comment. If you want to output the mode of an file action, you do -o mode, and everything works. The special attributes are ones that do not have a one-to-one mapping with attributes of an action.

Since the search output and contents output are trying to behave
similarly, they should probably share code.  Perhaps I missed it, but I
didn't see any changes to the contents routine.

Actually, nearly all the change is commonizing code between search and contents. The change for contents starts in display_contents_results (line 1552). The code that used to be in that method has been refactored and adjusted to be shared between contents and search. Does that help? (To be more explicit, both search and contents share all the functions defined between lines 1388 and
1550.)
The search() method in client.py is getting large and heavily indented.
If possible, please extract some of that code into other methods.
I'll look at what's possible here.

Thanks,

-j

_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to