#!/bin/sh OLD=solex_snv41_eol NEW=solex_snv43_bol CD=/cdrom/sol_11_x86/Solaris_11/Product TARGET=/zfsroot pkginfo -R $TARGET/.zfs/snapshot/$NEW > /tmp/pkginfo.$NEW pkginfo -R $TARGET/.zfs/snapshot/$OLD > /tmp/pkginfo.$OLD # these two files end up being owned by root :( # if you use a different name, this isn't a problem for the following two steps: sort pkginfo.$OLD > 0; mv 0 pkginfo.$OLD sort pkginfo.$NEW > 0; mv 0 pkginfo.$NEW diff -U0 pkginfo.$OLD pkginfo.$NEW|grep "^-"|perl -pe 's/(\S+)\s+(\S+)\s+(.*)/$2/' |xargs echo > manifest # some work must be done to prune out packages not available from the CD :( # e.g. O9opera SMCdb SPRO* # su pushd $CD pkgadd -R $TARGET -d $CD `cat /tmp/manifest`