Danek Duvall wrote:
On Mon, Mar 09, 2009 at 06:14:45PM -0700, Brock Pytlik wrote:

directory.py

  - line 51: use os.path.sep instead of "/"

file.py

  - line 61: use os.path.sep instead of "/"

link.py:

  - line 50: use os.path.sep instead of "/"
Ok,, I'll fix those

Be careful here.  I commented a bit on this as well (but I'm much slower
than johansen, so I haven't finished my review yet), but this has impact on
Windows boxes.  Take a look at bug 1059 for a similar problem.
I'll be honest, I don't know what the right solution is here. For this put back, I think mimicking existing behavior is an adequate goal.

Stepping back for a larger picture, I'm not sure what the final goal is. searching for `whence ls` is nice idea in theory, but has some large problems. Suppose I install ls in a user image (and set my path appropriately). Now `whence ls` returns /foo/bar/user_image/usr/bin ls. Right now, we won't match that either. Adding the path seperator to the front of the path during indexing is essentially an assumption that we're indexing a root image. I don't think I understand the full scope of the problem in bug 1059, nor what we desire the behavior to actually be, nor even really that (assuming I switch to os.path.sep) whether I'm making things better or worse. I hope your comments will help me understand this issue better.

Perhaps we could do clever things by noticing when something someone is searching matches the path to the user image and stripping that off the search, or adding that information to the index. I tend to think that indexing the relative path, as we're doing now, and attempting to strip it off the query is the right way to go as that would allow things to work for both local and remote searches, but I can see some fun ambiguity there. Anyway, I think unless my changes are making things substantially worse, I'd like to avoid dealing with this issue for this putback.
Anyway, I'll try to finish the review tomorrow so I can send it out.
Though if you want me to send out what I've got early, I can.
Tomorrow is fine for me. I just finished getting synced with Shawn's putback, so I'm going to put that out and address a few other comments, then put out a webrev so that Michal or Padraig can work against that.
Danek

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

Reply via email to