@ -93,15 +93,18 @@ def global_excludes():
return lst
return lst
def file_copy ( source , dest , progress_cb ) :
def file_copy ( source , entry , progress_cb ) :
"""
"""
Extract given image using rsync .
Extract given image using rsync .
: param source :
: param source : Source file . This may be the place the entry ' s
: param dest :
image is mounted , or if it ' s a single file, the entry ' s source value .
: param progress_cb :
: param entry : The UnpackEntry being copied .
: return :
: param progress_cb : A callback function for progress reporting .
Takes a number and a total - number .
"""
"""
dest = entry . destination
# Environment used for executing rsync properly
# Environment used for executing rsync properly
# Setting locale to C (fix issue with tr_TR locale)
# Setting locale to C (fix issue with tr_TR locale)
at_env = os . environ
at_env = os . environ
@ -313,7 +316,7 @@ class UnpackOperation:
else :
else :
source = imgmountdir
source = imgmountdir
return file_copy ( source , entry . destination , progress_cb )
return file_copy ( source , entry , progress_cb )
finally :
finally :
if not entry . is_file ( ) :
if not entry . is_file ( ) :
subprocess . check_call ( [ " umount " , " -l " , imgmountdir ] )
subprocess . check_call ( [ " umount " , " -l " , imgmountdir ] )