|
@@ -15,7 +15,7 @@ class PackageClass
|
|
|
self::setProgressFailed('INITIALIZE_FAILED');
|
|
|
return false;
|
|
|
}
|
|
|
- logInfo("distribute mode",self::$config['distribute-mode']);
|
|
|
+ logInfo("distribute mode: ",self::$config['distribute-mode']);
|
|
|
|
|
|
//分发模式
|
|
|
if( self::$config['distribute-mode'] == 'install'){
|
|
@@ -327,7 +327,10 @@ class PackageClass
|
|
|
logInfo($repoName,"skip copy config file",$targetPath);
|
|
|
}
|
|
|
$targetPath = pathJoin($configDir,$targetName);
|
|
|
- fileCopy($filePath,$targetPath);
|
|
|
+ if(! fileCopy($filePath,$targetPath) ){
|
|
|
+ logError($repoName,"config file copy failed",$filePath);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
}*/
|
|
@@ -335,7 +338,6 @@ class PackageClass
|
|
|
//拷贝copy-files文件
|
|
|
private static function copyFiles($packageInfo)
|
|
|
{
|
|
|
- logInfo("start copying files");
|
|
|
$app = self::$app;
|
|
|
$cacheDir = $packageInfo['cacheDir'];
|
|
|
$repoName = $packageInfo['repoName'];
|
|
@@ -347,15 +349,20 @@ class PackageClass
|
|
|
$targetName = $fileInfo['target'];
|
|
|
$filePath = pathJoin($rootDir,$fileName);
|
|
|
if(! file_exists($filePath) ){
|
|
|
- logError($repoName,"file not exists",$filePath);
|
|
|
+ logError("failed to copy file, file not exists.",$filePath);
|
|
|
return false;
|
|
|
}
|
|
|
if(!$fileInfo['override'] && file_exists($targetPath)){
|
|
|
- logInfo($repoName,"skip copy file",$targetPath);
|
|
|
+ logInfo("skip copy file, file already exists",$targetPath);
|
|
|
}
|
|
|
$targetPath = pathJoin($rootDir,$targetName);
|
|
|
- logInfo($repoName,"copy file ",$fileName," -> ",$targetName);
|
|
|
- fileCopy($filePath,$targetPath);
|
|
|
+ if( fileCopy($filePath,$targetPath) ){
|
|
|
+ logInfo("succeeded to copy file",$fileName," -> ",$targetName);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ logError("failed to copy file, copy action failed.",$filePath);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
}
|