Set TPKG_ACTION ENV var on remove or upgrade. This allows for symmetry between preinstall/preremove and postinstall/postremove. It is the complement to the following:
def unpack(package_file, options={})
ret_val = 0
# set env variable to let pre/post install know whether this unpack
# is part of an install or upgrade
if options[:is_doing_upgrade]
ENV['TPKG_ACTION'] = "upgrade"
else
ENV['TPKG_ACTION'] = "install"
End
Set TPKG_ACTION ENV var on remove or upgrade. This allows for symmetry between preinstall/preremove and postinstall/postremove. It is the complement to the following: