Saurabh Vyas wrote:
Brock Pytlik wrote:
webrev : http://cr.opensolaris.org/~saurabhv/fix-9970/
Given the comment immediately above, it seems like what's coming back in
"match" isn't the right thing.  Is the comment wrong?
Well... it kinda depends on what "the right thing" means. What's sent back in 'match' is the token which matched the search query. Generally, this is what you want (I think), but with something like a description, an argument can be made that what you really want is the entire contents of the description, not just the matching string. I think the comment should probably say something like,

For those actions, the match parameter states which token in the values matched the query.
Thanks for you inputs and suggestions.


I'm reasonably comfortable with the fix proposed as a starting point, but I have my doubts that it'd work correctly on an action like this:
set=name value=foo value=baz value=bar value="whee fun"

In this case, I'd expect 'pkg search bar' to return
description set       bar   pkg://<pkg name>

But 'pkg search fun' or 'pkg search whee' to return:
description set       whee fun   pkg://<pkg name>
So the expected behavior is to list out all the values in the above searches, i.e.

$ pkg search bar
description set       foo baz bar whee fun    pkg://<pkg name>
No, each search shows one value. Sometimes that value contains one token (see the result of pkg search bar). Sometimes that value contains more than one token (see the result of pkg search fun).

Is my understanding correct?
Apart how can I tweak the package info to have multiple values (so that I can use that as a valid test)
You'll change the package in t_api_search most likely, and possible t_pkg_search as well.

Brock

Also, I'd like to see test cases added for the correct behavior.
I would add the test case too.

Thanks,
~Saurabh


Thanks,
Brock


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

Reply via email to