Danek, I realize IPS isn't multi-platform yet, but do you expect
this code to work on non-OpenSolaris platforms? I'd be happy to
test it if you want to send me your cset.
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?).
Also, in the code itself, this looks dubious:
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().
-jhf-
Danek Duvall wrote:
> http://cr.opensolaris.org/~dduvall/pkg-server-query/
>
> This is the extension to "pkg search" that allows it to ask the same
> questions of the servers it knows about that it can currently ask of an
> image.
>
> Some points:
>
> - Currently, it uses "pkg search -s" to activate server query, which is
> wrong. Possibly "pkg search -s <server>" would be good, but to turn
> the current -s into -r (for remote), which is what I'm currently
> leaning towards. Another suggestion would be to make it search
> remotely (and locally?) by default, and only search locally with -l.
> Any thoughts on this would be appreciated.
>
> - I've appropriated exit code 4 for "server(s) failed to respond", which
> is slightly different from the exit code 3 of "partial failure" on
> refresh, as we definitely want to distinguish failure to find a token
> to failure to even start the search. Think UNAVAIL vs NOTFOUND in
> nsswitch.conf, if you will.
>
> - I've taken the subprocess module, ripped out its Windows half and
> turned Popen into Mopen, which forks off and runs a method, rather than
> forking and execing. There's some weirdness here I'm not entirely sure
> about, but it's been working pretty well for me so far. Any
> suggestions on how to do the license/copyright mods correctly would be
> great.
>
> - That's all used to allow the server to (re)generate the search database
> asynchronously, so we don't have to wait several minutes before the
> server starts, erm, serving. So there's a bunch of code to make sure
> it does something sane while the search service is unavailable.
>
> - I'm using ndbm as a store for the search indices. The files are
> ginormous (27G for my build 74 repo), but quite holey, so little disks
> space is taken up (42M in the same case). In addition, we're limited
> to 1k for each key/value pair, so I've had to chain these things
> together. Thoughts on how this will go horribly, painfully wrong (and
> how to get around it) would be appreciated. We're looking at using
> qdbm in the future, but I haven't yet gotten the OSR going for that.
>
> - The search db (and now also the catalog) is rebuilt when the timestamp
> on it is older than the manifests. This increases startup time a
> little bit, but so far not much. There is no way yet to rebuild to
> rebuild the db on the fly -- you have to stop the server, remove the
> db, and restart.
>
> Sorry for the essay -- no, wait, it's six paragraphs, so I'm okay.
>
> Thanks,
> Danek
> _______________________________________________
> pkg-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss