def run(self): using = [] failed = False for pkg in self.spec.packages: if self.rpms.find('/usr/share/mime/packages/*', pkg): using.append(pkg) rpm_pkg = self.rpms.get(pkg) if not in_list('update-mime-database', [rpm_pkg.postun, rpm_pkg.post]): failed = True if not using: self.set_passed(self.NA) return text = "mimeinfo files in: " + ', '.join(using) self.set_passed(self.FAIL if failed else self.PENDING, text)