Exemplo n.º 1
0
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))
Exemplo n.º 2
0
 def _hashID(self):
     # Hashes the erratum name
     return hash_object_id(self.id, 1)
Exemplo n.º 3
0
 def _hashID(self):
     # Hashes the package name
     return hash_object_id(self.id, 2)
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 def _hashID(self):
     # Hashes the package name
     return hash_object_id(self.id, 2)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 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))
Exemplo n.º 9
0
 def _hashID(self):
     # Hashes the erratum name
     return hash_object_id(self.id, 1)