@@ -1390,8 +1390,10 @@ def report_hook(index, blksize, size):
1390
1390
return target
1391
1391
elif parsed_url .scheme in ('git' ,):
1392
1392
if os .path .isdir (target ):
1393
- with current_directory (self .get_build_dir (arch .arch )):
1394
- shprint (sh .git , 'pull' , '--all' )
1393
+ with current_directory (target ):
1394
+ shprint (sh .git , 'pull' )
1395
+ shprint (sh .git , 'pull' , '--recurse-submodules' )
1396
+ shprint (sh .git , 'submodule' , 'update' , '--recursive' )
1395
1397
else :
1396
1398
shprint (sh .git , 'clone' , '--recursive' , url , target )
1397
1399
return target
@@ -1588,7 +1590,7 @@ def download(self):
1588
1590
do_download = True
1589
1591
1590
1592
marker_filename = '.mark-{}' .format (filename )
1591
- if exists (filename ):
1593
+ if exists (filename ) and os . path . isfile ( filename ) :
1592
1594
if not exists (marker_filename ):
1593
1595
shprint (sh .rm , filename )
1594
1596
elif self .md5sum :
@@ -1680,7 +1682,7 @@ def unpack(self, arch):
1680
1682
raise Exception ('Could not extract {} download, it must be .zip, '
1681
1683
'.tar.gz or .tar.bz2' )
1682
1684
elif os .path .isdir (extraction_filename ):
1683
- os . symlink (extraction_filename , directory_name )
1685
+ shutil . copytree (extraction_filename , directory_name )
1684
1686
else :
1685
1687
raise Exception ('Given path is neither a file nor a directory: {}' .format (extraction_filename ))
1686
1688
0 commit comments