| | |
| | | interface=pkg.client.api.ImageInterface("/", pkg.client.api.CURRENT_API_VERSION, progtracker, lambda x: False, None,None) |
| | | ret = interface.info([pkg_name],True,info_needed) |
| | | if ret[pkg.client.api.ImageInterface.INFO_FOUND]: |
| | | for i in ret[pkg.client.api.ImageInterface.INFO_FOUND]: |
| | | if i.publisher not in ("openindiana.org","userland","on-nightly"): |
| | | allowed_pubs = engine.get_param("%s.allowed_pubs" % self.name).split(" ") + ["openindiana.org","on-nightly"] |
| | | for i in ret[pkg.client.api.ImageInterface.INFO_FOUND]: |
| | | if i.publisher not in allowed_pubs: |
| | | engine.error(_("package %(pkg)s depends on %(name)s, which comes from forbidden publisher %(publisher)s") % |
| | | {"pkg":manifest.fmri,"name":pkg_name,"publisher":i.publisher}, msgid="%s%s.1" % (self.name, pkglint_id)) |
| | | |
| | |
| | | "license actions and ARC information are required if you deliver files.") |
| | | |
| | | def publisher_in_fmri(self, manifest, engine, pkglint_id="002"): |
| | | lint_id = "%s%s" % (self.name, pkglint_id) |
| | | allowed_pubs = engine.get_param( |
| | | "%s.allowed_pubs" % lint_id).split(" ") |
| | | "%s.allowed_pubs" % self.name).split(" ") |
| | | |
| | | fmri = manifest.fmri |
| | | if fmri.publisher and fmri.publisher not in allowed_pubs: |