Hmm, amazing what I'm finding as I unroll the stack of email. Anyway, 
I'm reasonably confident this is the last of the responses to Danek's 
earlier comments.
>> attributes.py:
>>
>>   - I'm a bit confused by the way generate_indices() works here.  All 
>> the
>>     dictionaries returned seem to have keys derived from the data, not
>>     describing what kind of thing they are (a la "path", "basename", or
>>     "hash" from the file action).  I would expect that a search hit 
>> on an
>>     fmri would come back as
>>
>>         INDEX           ACTION   VALUE                  PACKAGE
>>         fmri            set      pkg:/[EMAIL PROTECTED]           
>> pkg:/[EMAIL PROTECTED]
>>
>>     not as
>>
>>         INDEX           ACTION   VALUE                  PACKAGE
>>         pkg:/[EMAIL PROTECTED]    set      ["foo", "1.2", None]   
>> pkg:/[EMAIL PROTECTED]
>>
>>     which is what it looks like it'll come back as.  Perhaps I'm just 
>> not
>>     far enough along to see how this makes sense, but given that you 
>> didn't
>>     touch any of the other actions' generate_indices() methods, I 
>> guess I'm
>>     going to remain confused.
Well, here's an example of what a match on a description looks like:
INDEX      ACTION    VALUE                     PACKAGE
gmake      set       description               pkg:/[EMAIL PROTECTED]

for this action:
set name=description value="gmake - GNU make"

And this is what a local search of SUNWgmake returns:
INDEX      ACTION    VALUE                     PACKAGE
fmri       set       fmri                      pkg:/[EMAIL PROTECTED]

for this action:
set name=fmri value=pkg:/[EMAIL PROTECTED],5.11-0.89:20080527T163123Z

In the first answer, I'd probably prefer that gmake and description were 
switched, but that's not possible without a fair amount of additional 
code to deal with the special case of attributes. If I'm remembering 
correctly, the problem has to do with the issue of what actions' 
key_attr can be set to. The value of key_attr is what currently ends up 
in column 3 (description for some set actions). If this is a serious 
problem, I can look into a way to make the output:
INDEX      ACTION    VALUE                     PACKAGE
description set      gmake               pkg:/[EMAIL PROTECTED]

I think the second answer is fine, but I'm open to suggestions on how to 
improve it.

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

Reply via email to