def _find_pkgs_with_dep(packages, search_dep):
    """ Return a list of packages which have a given dependency """
    pkgs_with_dep = []
    for info in packages.values():
        for dep in info.get('depends', []):
            if dep.startswith(search_dep):
                pkgs_with_dep.append(info)
    return pkgs_with_dep