[OpenIndiana-discuss] List of installed pkgs begining with pkg:/

Harry Putnam reader at newsguy.com
Tue Nov 1 13:33:36 UTC 2011


How can I get a list of installed pkgs that begin with pkg:/[...]

I'm trying to match one OS to another with more installed pkgs. I
thought I could just do:
pkg list > installed_mach1
pkg list > installed_mach2

Diff the lists and have the pkg names.

But as many of you will know... `pkg list' doesn't output pkgs by
listing them as pkg:/[whatever]

Instead it is a list of each installed tool.  For example: vim and
gvim are in the same pkg but in `pkg list' output it is two different
lines, even though its the same pkg.  I think there are some where
several lines would really be all one pkg.

I thought maybe something like:

   pkg list |awk '{print $2}' |uniq sort -o uniq_installed

But then you'd have to go back and do a pkg search on each string to
get the full pkg name.

I bet there is some nifty way to do this:

Get a handy list of installed pkgs on one machine, in a format that
could be fed to `pkg install' on another OS, so as to end up with all
the same stuff installed on both machines.

Am I just making things hard... and there is some simple way?

Anyone know how this might be done?




More information about the OpenIndiana-discuss mailing list