upgradepkg_divide_name

SYNOPSIS

upgradepkg_divide_name pattern package_to_install package_to_remove

DESCRIPTION

It cuts the pattern into two based on UPGRADEPKG_FS, if UPGRADEPKG_FS is not null.If UPGRADEPKG_FS forms the end of the pattern and is not present more than once in the pattern, there is no package to be installed and therefore ERR_UPGRADE_NO_PKG is returned.Otherwise, the pattern is split into two at the first occurence of UPGRADEPKG_FS.The second part is stored in variable package_to_install and the first in package_to_remove.

If UPGRADEPKG_FS is null or UPGRADEPKG_FS is not part of the pattern, the entire pattern is taken as name of package to be installed and is stored in package_to_install.package_to_remove is set to null value.