コード例 #1
0
ファイル: diskImportLib.py プロジェクト: BlackSmith/spacewalk
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))
コード例 #2
0
ファイル: xmlDiskSource.py プロジェクト: TJM/spacewalk
 def _hashID(self):
     # Hashes the erratum name
     return hash_object_id(self.id, 1)
コード例 #3
0
ファイル: xmlDiskSource.py プロジェクト: TJM/spacewalk
 def _hashID(self):
     # Hashes the package name
     return hash_object_id(self.id, 2)
コード例 #4
0
ファイル: syncCache.py プロジェクト: bjmingyang/spacewalk
 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))
コード例 #5
0
ファイル: dumper.py プロジェクト: BlackSmith/spacewalk
 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)
コード例 #6
0
ファイル: xmlDiskSource.py プロジェクト: yanheven/spacewalk
 def _hashID(self):
     # Hashes the package name
     return hash_object_id(self.id, 2)
コード例 #7
0
ファイル: dumper.py プロジェクト: admd/spacewalk-upstream
 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)
コード例 #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))
コード例 #9
0
ファイル: xmlDiskSource.py プロジェクト: meaksh/uyuni
 def _hashID(self):
     # Hashes the erratum name
     return hash_object_id(self.id, 1)