Lines 184-193
def _perform_md5_merge(x, **kwargs):
Link Here
|
184 |
encoding=_encodings['merge'], errors='strict'), **kwargs) |
184 |
encoding=_encodings['merge'], errors='strict'), **kwargs) |
185 |
|
185 |
|
186 |
def perform_all(x, calc_prelink=0): |
186 |
def perform_all(x, calc_prelink=0): |
187 |
mydict = {} |
187 |
return dict( (k, perform_checksum(x, k, calc_prelink)[0]) |
188 |
for k in hashfunc_map: |
188 |
for k in hashfunc_map.keys() ) |
189 |
mydict[k] = perform_checksum(x, hashfunc_map[k], calc_prelink)[0] |
|
|
190 |
return mydict |
191 |
|
189 |
|
192 |
def get_valid_checksum_keys(): |
190 |
def get_valid_checksum_keys(): |
193 |
return list(hashfunc_map) |
191 |
return list(hashfunc_map) |
Lines 301-308
def perform_checksum(filename, hashname="MD5", calc_prelink=0):
Link Here
|
301 |
prelink_capable = False |
299 |
prelink_capable = False |
302 |
try: |
300 |
try: |
303 |
if hashname not in hashfunc_map: |
301 |
if hashname not in hashfunc_map: |
304 |
raise portage.exception.DigestException(hashname + \ |
302 |
raise portage.exception.DigestException( |
305 |
" hash function not available (needs dev-python/pycrypto)") |
303 |
"%s hash function not available (needs dev-python/pycrypto)" |
|
|
304 |
% hashname ) |
306 |
myhash, mysize = hashfunc_map[hashname](myfilename) |
305 |
myhash, mysize = hashfunc_map[hashname](myfilename) |
307 |
except (OSError, IOError) as e: |
306 |
except (OSError, IOError) as e: |
308 |
if e.errno in (errno.ENOENT, errno.ESTALE): |
307 |
if e.errno in (errno.ENOENT, errno.ESTALE): |