As much as I like Solaris the packaging system is crap. And fathoming out what package you need to install to gain a particular command is nigh on impossible. I never do a full install of the OS, but frequently at some point after installation I want a particular command I forgot in the first instance.
So I did something drastic today. I did a full install of Solaris 10 update 7, then built an index file from /var/sadm/install/contents just to work out what package contained what file.
I’m probably going to write a wrapper around this, so the file can be queried. But here’s a grim perl regex that gives you output in the form of “/full/path/to/filename package”
perl -ne 'm/(^.*?)\s .*? \s([A-Z]{1,} \w+ ((-|)\w+){0,}) $/x; print "$1 $2\n"' /var/sadm/install/contents
If you can make that regex neater, please feel free to suggest it.
I’ve been using Ubuntu as a desktop OS this week, for the first time. Lots of things I was expecting aren’t there by default, but when you type
svn co http://foo/bar/baz
and discover you don’t have svn, it helpful chirps up
‘to install this try apt-get install subversion’
Which is fabulously helpful.
Please publish your Solaris filename-to-package-map, it would be immensely helpful.
The filename-to-package map was created from an installed system’s /var/sadm/install/contents – this was a clean install of Sol10u7. So, each time we need to build this map up it’ll be specific to a release version. Not ideal, and a faff to do – but, easyish with VMware I guess. I’ll publish what I have to u7, and with u8 now out maybe I’ll do another one for that. Look for a topic update shortly.
Cheers!
OK, there’s a list file here … http://probably.co.uk/wp-content/uploads/2009/10/sol10u6.lst.bz2
What I might get around to doing is a web based app that allows you to query it for the package containing a given filename. If I get the time.