Lines Matching refs:pkg_name
109 __slots__ = ["version", "publisher", "pkg_name", "_hash", "__weakref__"]
126 self.pkg_name = fmri[nameidx:veridx]
135 self.pkg_name = fmri[nameidx:]
138 # pkg_name and version must be explicitly set.
139 self.pkg_name = name
151 if not self.pkg_name:
155 if not self.valid_pkg_name.match(self.pkg_name):
157 detail=self.pkg_name)
286 return self.pkg_name
289 self.pkg_name = name
310 return "{0}{1}".format(pkg_str, self.pkg_name)
314 self.pkg_name)
334 return "{0}{1}{2}".format(pkg_str, self.pkg_name,
339 return "{0}{1}/{2}{3}".format(pkg_str, publisher, self.pkg_name,
356 return "{0}{1}".format(pkg_str, self.pkg_name)
358 return "{0}{1}@{2}".format(pkg_str, self.pkg_name,
366 self.pkg_name)
369 self.pkg_name,
376 names = self.pkg_name.split("/")
390 fmristr = "pkg:/{0}".format(self.pkg_name)
392 fmristr = "pkg:/{0}@{1}".format(self.pkg_name,
396 self.pkg_name)
399 self.pkg_name, self.version)
413 h = self._hash = hash(self.version) + hash(self.pkg_name)
424 self.pkg_name == other.pkg_name and \
448 if self.pkg_name < other.pkg_name:
450 if self.pkg_name != other.pkg_name:
473 if self.pkg_name > other.pkg_name:
475 if self.pkg_name != other.pkg_name:
493 return "{0}".format(quote(self.pkg_name, ""))
498 return "{0}@{1}".format(quote(self.pkg_name, ""),
505 return "{0}".format(quote(self.pkg_name, ""))
510 return "{0}/{1}".format(quote(self.pkg_name, ""),
520 return "{0}@{1}".format(quote(self.pkg_name, ""),
526 return self.pkg_name == other.pkg_name
529 return self.get_publisher_str(), self.pkg_name, self.version
534 m = re.match(fmristr, self.pkg_name)
540 return self.pkg_name == other.pkg_name
546 if self.pkg_name != other.pkg_name:
570 def fmri_match(pkg_name, pattern):
571 """Returns true if 'pattern' is a proper subset of 'pkg_name'."""
572 return ("/" + pkg_name).endswith("/" + pattern)
574 def glob_match(pkg_name, pattern):
575 return fnmatch.fnmatchcase(pkg_name, pattern)
577 def regex_match(pkg_name, pattern):
579 'pkg_name'."""
580 return re.search(pattern, pkg_name)
582 def exact_name_match(pkg_name, pattern):
583 """Returns true if 'pattern' matches 'pkg_name' exactly."""
584 return pkg_name == pattern
588 substring that is the FMRI's pkg_name."""
594 pkg_name = fmri[nameidx:veridx]
596 pkg_name = fmri[nameidx:]
598 return pkg_name