Danek Duvall wrote:
> On Thu, Nov 15, 2007 at 01:14:37PM -0500, James Falkner wrote:
>
>> Danek, I realize IPS isn't multi-platform yet, but do you expect
>> this code to work on non-OpenSolaris platforms?
>
> Not on the server side, no.
>
>> In particular, you said you ripped out some Windows code - is that
>> code absolutely necessary for this to work there? Or do you think
>> your replacement work also (with potentially reduced performance or
>> something on Windows?).
>
> Yeah, if you wanted the server to do this on Windows, you'd need to add
> that code back in. I can't test it, and unlike some basic path stuff, I
> can't be reasonably sure it works just by looking at it, and I'm not going
> to introduce dead code, so I ripped it out.
>
> Non-Solaris support on the client is something we're happy to try to
> maintain, but if you want the server to run on non-unix platforms, I think
> you're mostly on your own.
Our customers and ISVs will want to run their own repositories for
development purposes on various platforms, so ideally we will be able
to support multiple platforms for the server side too. There's no
reason it can't be done today but I hope that the community will recognize
the value there, and remain _portable_ (as opposed to ported) for the
server side.
>> transaction.py
>>
>> + # update search index
>> + cfg.catalog.update_searchdb([os.path.join(
>> + cfg.pkg_root,fmri.get_dir_path()).rsplit("/", 1)])
>>
>> Doing string-based operations (like rsplit) on the result of
>> os.path.join is probably not going to work cross-platform,
>> since os.path.joinwill insert a platform-specific separator
>> in its output, between cfg.pkg_root and fmri.get_dir_path().
>
> If I changed the "/" to os.path.sep, will that address your concern?
Yep. That should do it, after our IRC discussion. If fmri.get_dir_path()
is, by design, supposed to return an OS filesystem path fragment, then it
may (in the future) contain OS filesystem path separator characters, so it's
best to stick with os.path.sep if that's the case, even you have "private"
knowledge that it will currently always use / as a separator.
-jhf-
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss