upgradepkg_find_pkg

SYNOPSIS

upgradepkg_find_pkg pattern variable

DESCRIPTION

This is like remove_find_pkg, except it doesnot support / based glob matching patterns for package patterns as it calls meta_find_pkg_noglob* functions directly.

Default behaviour is to remove all matched package, ie REMOVEALL is 1 here by default.All the packages matched are stored( the check for maximum removals allowed is not done here). If -u|--unique was specified, ie when REMOVEALL is 2, the package matched must be the only match. .If --ask was specified (ASK is 1), again all matched packages are stored.

Unlike removepkg, the difference between REMOVALL=1 and ASK=1 is that in case of REMOVEALL=1 all packages are directly selected for removal only if ASK=0 in case the number of matched packages is less than REMOVEPKG_MAXRM. In case of removepkg, if REMOVEALL=1 all packages are selected directly if less than REMOVEPKG_MAXRM even if ASK=1.

If ASK is 1, all packages matched are asked one by one for users confirmation instead of falling to default behaviour when REMOVEALL is 1 and ASK is zero.

If REMOVEALL is 2, means the user specifically wants to remove a package only if a single match was found.In that case we call meta_find_pkg_noglob_unique. Otherwise, if REMOVEALL is 1(ie we remove all packages matching the given pattern if number of such packages is within specified limit) or if ASK mode is active we call to meta_find_pkg_noglob to get a list of all matched package.

If none of above conditions are met, ie REMOVEALL and ASK are zero,(REMOVEALL being zero is not possible currently),We use the first among the matched packages.

RETURN

(these error statuses are defined in removepkg.functions)