def for_each_package_specs(ns, pkg_specs, info, func,
        repoid=None, just_on_installed=True):
    done_on = []
    failed = []
    for pkg_spec in pkg_specs:
        if just_on_installed:
            identities = [
                        i.to_instance()
                    for i in software.find_package(ns,
                        pkg_spec=pkg_spec, repoid=repoid)]

            identities = [p for p in identities
                            if software.is_package_installed(p)]
        else:
            identities = list(software.find_package(ns,
                pkg_spec=pkg_spec, repoid=repoid))
        if len(identities) < 1:
            if just_on_installed:
                msg = 'No such installed package "%s".' % pkg_spec
            else:
                msg = 'Failed to find package "%s".' % pkg_spec
            LOG().warn(msg + ' Skipping.')
            failed.append(msg)
            continue
        if len(identities) > 1:
            LOG().debug('More than one package found for "%s": %s',
                    pkg_spec,
                    ', '.join(software.get_package_nevra(i)
                        for i in identities))
        try:
            func(identities[-1])
            done_on.append(pkg_spec)
        except errors.LmiFailed as err:
            failed.append(err)
    return done_on, failed
Ensures that Varnish's configuration file at the specified path is up-to-date.
dataset/ETHPy150Open openlmi/openlmi-scripts/commands/software/lmi/scripts/software/cmd.py/for_each_package_specs--crossover with--dataset/ETHPy150Open python-provy/provy/provy/more/debian/cache/varnish.py/VarnishRole.ensure_conf