已合并
fix:whl安装移动到 install_common_parser 前面,先安装whl包再统一权限规范 #172
qinhan创建于 10 天前
fix:whl安装移动到 install_common_parser 前面,先安装whl包再统一权限规范 #172
已合并
qinhan创建于 10 天前
共 1 个文件变更+9-10
@@ -332,8 +332,6 @@ install_whl_package() {
332 else332 else
333 logandprint "[INFO]: ${_package_name} installed successfully!"333 logandprint "[INFO]: ${_package_name} installed successfully!"
334 fi334 fi
335- chmod -R "${CUSTOM_PERM}" "${_pythonlocalpath}"/${_package_name} 2> /dev/null
336- chmod -R "${CUSTOM_PERM}" "${_pythonlocalpath}"/${_package_name}-*.dist-info 2> /dev/null
337 else335 else
338 logandprint "[ERROR]: ERR_NO:0x0080;ERR_DES:install ${_package_name} failed, can not find the matched package for this platform."336 logandprint "[ERROR]: ERR_NO:0x0080;ERR_DES:install ${_package_name} failed, can not find the matched package for this platform."
339 exit 1337 exit 1
@@ -350,10 +348,6 @@ install_es_whl() {
350 local python_es_whl_name="es_ras"348 local python_es_whl_name="es_ras"
351 local whl_install_dir_path="${TARGET_VERSION_DIR}/python/site-packages"349 local whl_install_dir_path="${TARGET_VERSION_DIR}/python/site-packages"
352 install_whl_package "${es_whl_path}" "${python_es_whl_name}" "${whl_install_dir_path}"350 install_whl_package "${es_whl_path}" "${python_es_whl_name}" "${whl_install_dir_path}"
353- 
354- if [ -d "${TARGET_VERSION_DIR}/ops_ras" ]; then
355- rm -rf "${TARGET_VERSION_DIR}/ops_ras"
356- fi
357}351}
358 352 
359install_cann_ops_ras_whl() {353install_cann_ops_ras_whl() {
@@ -407,6 +401,10 @@ add_init_py() {
407 if [ -n "${opp_builtin_mod}" ]; then401 if [ -n "${opp_builtin_mod}" ]; then
408 chmod ${opp_builtin_mod} -R "${built_in_impl_path}" 2>/dev/null402 chmod ${opp_builtin_mod} -R "${built_in_impl_path}" 2>/dev/null
409 fi403 fi
404+ 
405+ if [ -d "${TARGET_VERSION_DIR}/ops_ras" ]; then
406+ rm -rf "${TARGET_VERSION_DIR}/ops_ras"
407+ fi
410}408}
411 409 
412install_opp() {410install_opp() {
@@ -420,6 +418,11 @@ install_opp() {
420 update_install_infos "${TARGET_USERNAME}" "${TARGET_USERGROUP}" "${INSTALL_TYPE}" "${relative_path_val}"418 update_install_infos "${TARGET_USERNAME}" "${TARGET_USERGROUP}" "${INSTALL_TYPE}" "${relative_path_val}"
421 log_with_errorlevel "$?" "error" "[ERROR]: ERR_NO:${INSTALL_FAILED};ERR_DES:Update opp install info failed."419 log_with_errorlevel "$?" "error" "[ERROR]: ERR_NO:${INSTALL_FAILED};ERR_DES:Update opp install info failed."
422 420 
421+ # whl安装移动到 install_common_parser 前面,先安装再统一权限规范
422+ install_es_whl
423+ 
424+ install_cann_ops_ras_whl
425+ 
423 bash "${COMMON_PARSER_FILE}" --copy_all --package="${OPP_PLATFORM_DIR}" --install --username="${TARGET_USERNAME}" \426 bash "${COMMON_PARSER_FILE}" --copy_all --package="${OPP_PLATFORM_DIR}" --install --username="${TARGET_USERNAME}" \
424 --usergroup="${TARGET_USERGROUP}" --set-cann-uninstall --version=$RUN_PKG_VERSION \427 --usergroup="${TARGET_USERGROUP}" --set-cann-uninstall --version=$RUN_PKG_VERSION \
425 --use-share-info --version-dir=$PKG_VERSION_DIR $INSTALL_OPTION ${INSTALL_FOR_ALL} "--feature=all" "--chip=all" \428 --use-share-info --version-dir=$PKG_VERSION_DIR $INSTALL_OPTION ${INSTALL_FOR_ALL} "--feature=all" "--chip=all" \
@@ -430,10 +433,6 @@ install_opp() {
430 433 
431 add_init_py434 add_init_py
432 435 
433- install_es_whl
434- 
435- install_cann_ops_ras_whl
436- 
437 logandprint "[INFO]: upgradePercentage:50%"436 logandprint "[INFO]: upgradePercentage:50%"
438}437}
439 438