Thanks (again) for the review.

Dan Price wrote:

> client.py:1617: Can getattr() be used here?

Nice; thanks.

> As I mentioned the last time this came for review, there's significant
> overlap with search here.  Perhaps the documentation in the man page
> could somehow guide the user about when to use contents and when search?

I've added the following paragraphs to the end of the contents section:

    The contents and search subcommands are related: both are used to
    query the system for the contents of packages.  The "contents" 
    subcommand is intended to take a set of package names and display
    a specified subset of what those packages contain, while search 
    is intended to take a token which might exist in a package and 
    display any such packages.
          
    Because of the pattern matching, each subcommand is capable of
    formulating some of the queries of which the other is capable,
    but some queries may be more natural with one or the other.

I'm not thrilled with the text (or the placement), and am happy to take
suggestions.

> Should we consider altering contents so that if nothing matches the
> criteria, it exits non-zero, a la grep?

Good idea.  I've set it up so that if no matches are found at all, the
following is printed:

    pkg: contents: no actions matching the patterns you specified with -a
    were found in the requested packages.

which is also not the best wording.  It also doesn't say anything if some
patterns resulted in matches, but others didn't.  I can keep track of
those, spit out both results and the error message, and exit with partial
success, if you think that'd be useful.

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

Reply via email to