Philip Brown wrote:

> If you compare the output of
> pkg search basename:pkgrepo
> vs
> pkg search path:/usr/bin/pkgrepo
> 
> Both give the *exact same output*.  Now as a long time systems
> programmer, I can understand the difference between "basename" and
> "path". But even I expect, that if something is indexed completely
> differently, on supposedly different values.. it should have different
> output for the 'value' column.

I don't understand why.  The "value" is the key attribute of the object it
refers to, which is the path attribute in this case.  I don't see why the
fact that the object can be found in different ways should result in a
different name for the object.

> Worse yet, the output of pkg search path:/usr/bin/pkgrepo
> 
> gives VALUE=usr/bin/pkgrepo
> 
> but if you actually try searching with that same value it CLAIMS to
> have...  pkg search path:usr/bin/pkgrepo
> get back nothing!
> You have to add an initial '/'  to have it work!!
> 
> Really, really confusing to a user :(

Yeah, we've been inconsistent about inputting and outputting the initial
slash.  We decided that you'd generally want to do something like "pkg
search $(which ls)", so the initial slash on input was something we wanted
to support.  It probably ought to allow you not to specify it, though.  And
since the attribute value actually doesn't have the slash (since we want to
be able to reserve the distinction between the two), that's what we
actually print.  It's not the greatest story, I agree.

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

Reply via email to