def conflict_rules(self, pkg):
    for (trigger, constraints) in pkg.conflicts.items():
        trigger_id = self.condition(spack.spec.Spec(trigger), name=pkg.name)
        self.gen.fact(fn.conflict_trigger(trigger_id))
        for (constraint, _) in constraints:
            constraint_id = self.condition(constraint, name=pkg.name)
            self.gen.fact(fn.conflict(pkg.name, trigger_id, constraint_id))
            self.gen.newline()
def conflict_rules(self, pkg):
    for (trigger, constraints) in pkg.conflicts.items():
        trigger_id = self.condition(spack.spec.Spec(trigger), name=pkg.name)
        self.gen.fact(fn.conflict_trigger(trigger_id))
        for (constraint, _) in constraints:
            constraint_id = self.condition(constraint, name=pkg.name)
            self.gen.fact(fn.conflict(pkg.name, trigger_id, constraint_id))
            self.gen.newline()