Chris Quenelle is a tools developer at Oracle Corp. He's worked on performance and debugging tools at Sun and Oracle for over 15 years. He reads comic books and science fiction, and has more tivos than he can keep track of.

 

September 2010
S M T W T F S
« Jun    
 1234
567891011
12131415161718
19202122232425
2627282930  

Finding the right package in OpenSolaris?

Ubuntu has a cool feature called command-not-found where they publish an index of all the binaries on the system, and the package that each one belongs to.  When you combine this with the bash command-not-found hook, you get a default environment that responds to a missing command by telling you what package to download.  (Sorry, too lazy for screenshots…)

Anyway, this feature would be a good use for the new pkg command.  You could write a script that creates an index of all binaries, and then store that index in the user’s home directory.  Another script could react to the command-not-found hook in bash and tell the user something useful.

In fact, you could almost do this interactively by querying the pkg database, except that when I query ‘dbx’ (for example), I get 37 hits.  Most are for the different versions of the right package, and a few are for a package-alias of some kind.  A script that got that answer would need to apply some clever heuristics to do the right thing.

It seems like a good afternoon project, but I haven’t had a spare afternoon in quite a while. The pkg-discuss@opensolaris.org alias can offer help with pkg issues.

Any takers?

http://quenelle.org/unix/wp-content/plugins/sociofluid/images/digg_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/reddit_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/dzone_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/stumbleupon_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/delicious_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/furl_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/technorati_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/facebook_24.png http://quenelle.org/unix/wp-content/plugins/sociofluid/images/twitter_24.png

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>