import portage
from portage.const import PRIVATE_PATH,PRELINK_BINARY,HASHING_BLOCKSIZE
from portage import os
+from portage import _fs_encoding
from portage import _merge_encoding
from portage import _unicode_encode
import errno
if hashname not in hashfunc_map:
raise portage.exception.DigestException(hashname + \
" hash function not available (needs dev-python/pycrypto)")
- myhash, mysize = hashfunc_map[hashname](myfilename)
+ myhash, mysize = hashfunc_map[hashname](_unicode_encode(myfilename,
+ encoding=_fs_encoding, errors='strict'))
except (OSError, IOError), e:
if e.errno == errno.ENOENT:
raise portage.exception.FileNotFound(myfilename)
"""
os = _os_merge
+ perf_md5 = perform_md5
showMessage = self._display_merge
scheduler = self._scheduler
pass
else:
os = portage.os
+ perf_md5 = portage.checksum.perform_md5
file_data = pkgfiles[objkey]
file_type = file_data[0]
continue
mymd5 = None
try:
- mymd5 = perform_md5(obj, calc_prelink=1)
+ mymd5 = perf_md5(obj, calc_prelink=1)
except FileNotFound, e:
# the file has disappeared between now and our stat call
show_unmerge("---", unmerge_desc["!obj"], file_type, obj)