Query package management tools only as needed by checking mtimes on package cache files