def has_errors(self): err = Checks() if not self.release: err.add(_("Update must have a release attribute")) err.has_tag(self.date, "Update", "Date") #err.has_tag(self.version, "Update", "Version") return err.list
def has_errors(self): err = Checks() if not self.filename: err.add(_("AdditionalFile should have file name string")) if not self.target: err.add(_("AdditionalFile should have a target attribute")) return err.list
def has_errors(self): err = Checks() # FIXME: is this an internal error?? -gurer if not hasattr(self, 'source'): err.add("Metadata should have source") err.join(self.source.has_errors()) if not self.package: err.add("Metadata should have a package") err.join(self.package.has_errors()) return err.list
def has_errors(self): """Return errors of the PSPEC file if there are any.""" #FIXME: has_errors name is misleading for a function that does #not just return a boolean value. check() would be better - exa err = Checks() err.join(self.source.has_errors()) if len(self.packages) <= 0: errs.add(_("There should be at least one Package section")) for p in self.packages: err.join(p.has_errors()) if len(self.history) <= 0: err.add(_("Source needs some education in History :)")) for update in self.history: err.join(update.has_errors()) return err.list
def has_errors(self): err = Checks() err.has_tag(self.name, "Package", "Name") err.has_tag(self.summary, "Package", "Summary") err.has_tag(self.description, "Package", "Description") err.has_tag(self.license, "Package", "License") if len(self.paths) <= 0: err.add(_("Package should have some files")) for path in self.paths: err.join(path.has_errors()) for dep in self.runtimeDeps: err.join(dep.has_errors()) for afile in self.additionalFiles: err.join(afile.has_errors()) return err.list
def has_errors(self): err = Checks() err.has_tag(self.name, "Source", "Name") err.has_tag(self.description, "Source", "Description") err.has_tag(self.summary, "Source", "Summary") err.has_tag(self.packager, "Source", "Packager") err.has_tag(self.license, "Source", "License") if (not self.archiveUri) or (not self.archiveType): err.add(_("Source archive URI and type should be given")) if not self.archiveSHA1: err.add(_("Source archive should have a SHA1 sum")) err.join(self.packager.has_errors()) for patch in self.patches: err.join(patch.has_errors()) for dep in self.buildDeps: err.join(dep.has_errors()) return err.list
def has_errors(self): err = Checks() err.has_tag(self.name, "Source", "Name") err.has_tag(self.description, "Source", "Description") err.has_tag(self.summary, "Source", "Summary") err.has_tag(self.packager, "Source", "Packager") err.has_tag(self.license, "Source", "License") if (not self.archiveUri) or (not self.archiveType): err.add("Source archive URI and type should be given") if not self.archiveSHA1: errd.add("Source archive should have a SHA1 sum") if len(self.history) <= 0: err.add("Source needs some education about History :)") err.join(self.packager.has_errors()) for update in self.history: err.join(update.has_errors()) for patch in self.patches: err.join(patch.has_errors()) for dep in self.buildDeps: err.join(dep.has_errors()) return err.list