def package_provider_rules(self, pkg):
    for provider_name in sorted(set((s.name for s in pkg.provided.keys()))):
        self.gen.fact(fn.possible_provider(pkg.name, provider_name))
    for (provided, whens) in pkg.provided.items():
        for when in whens:
            condition_id = self.condition(when, provided, pkg.name)
            self.gen.fact(fn.provider_condition(condition_id, when.name, provided.name))
        self.gen.newline()
def package_provider_rules(self, pkg):
    for provider_name in sorted(set((s.name for s in pkg.provided.keys()))):
        self.gen.fact(fn.possible_provider(pkg.name, provider_name))
    for (provided, whens) in pkg.provided.items():
        for when in whens:
            condition_id = self.condition(when, provided, pkg.name)
            self.gen.fact(fn.provider_condition(condition_id, when.name, provided.name))
        self.gen.newline()