installpkg_state

SYNOPSIS

installpkg_state_start basename

installpkg_state_end

installpkg_state

installpkg_state_basename

DESCRIPTION

installpkg_state_start sets the value of a global internal variable to zero.The value of this variable by default is 1.

installpkg_state_end after a call to installpkg_state_start can be used to reset the value back to 1.

These two are used to set the state to zero before any install and it is set back to 1 after a successful or unsuccessful install.

The use of these function is that by finding the state at exit we can find out if we were interrupted during the installation.If we were, we should restore from backup and move the database index to partial_packages and remove the doinst script if it was already stored in the scripts directory.