def rpmsPath(obj_id, mountPoint, sources=0): # returns the package path (for exporter/importer only) # not to be confused with where the package lands on the satellite itself. if not sources: template = "%s/rpms/%s/%s.rpm" else: template = "%s/srpms/%s/%s.rpm" return os.path.normpath(template % (mountPoint, hash_object_id(obj_id, 2), obj_id))
def _hashID(self): # Hashes the erratum name return hash_object_id(self.id, 1)
def _hashID(self): # Hashes the package name return hash_object_id(self.id, 2)
def _get_key(self, object_id): hash_val = hash_object_id(object_id, 1) return os.path.join("satsync", self._subdir, hash_val, str(object_id))
def _get_key(self, params): item_id = str(params[self.item_id_key]) hash_val = rhnLib.hash_object_id(item_id, self.hash_factor) return self.key_template % (hash_val, item_id)