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.


Comments

comments powered by Disqus