removepkg_select_pkg

SYNOPSIS

removepkg_select_pkg var pkg...

DESCRIPTION

Select among the given packages and store them in var depending on values of REMOVEALL and ASK.

If REMOVEALL is 1, then select all the packages if they are less than REMOVEPKG_MAXRM.As a special case, if REMOVEALL is 0, select all the packages. Otherwise, If REMOVEALL is 2, select the given package which should be only one in number.This is assumed and not verified because error checking must have been done while finding the package.In case ASK is 1 and REMOVEALL is 0, ask the user to confirm removal for each package one by one. Otherwise, fallback to default behaviour and store the given packages (which should be a single package, error checking is not done again as it should have been done before while finding the packages) in var.

See the description for removepkg_find_pkg too.

RETURN

0 success ERR_META_MAXRM in case the matched packages exceed REMOVEPKG_MAXRM and REMOVEALL is 1