已合并
fix: 解决npu-runtim包--full安装后,--upgrade丢失文件问题 #1844
zhengfeiteng创建于 4月27日
fix: 解决npu-runtim包--full安装后,--upgrade丢失文件问题 #1844
已合并
共 1 个文件变更+1-6
| @@ -15,7 +15,6 @@ is_quiet=n | |||
| 15 | in_install_for_all=n | 15 | in_install_for_all=n |
| 16 | setenv_flag=n | 16 | setenv_flag=n |
| 17 | docker_root="" | 17 | docker_root="" |
| 18 | -sourcedir="$PWD/runtime" | ||
| 19 | curpath=$(dirname $(readlink -f "$0")) | 18 | curpath=$(dirname $(readlink -f "$0")) |
| 20 | common_func_path="${curpath}/common_func.inc" | 19 | common_func_path="${curpath}/common_func.inc" |
| 21 | runtime_func_path="${curpath}/runtime_func.sh" | 20 | runtime_func_path="${curpath}/runtime_func.sh" |
| @@ -121,10 +120,6 @@ if [ ! -d "$common_parse_dir" ]; then | |||
| 121 | fi | 120 | fi |
| 122 | 121 | ||
| 123 | new_upgrade() { | 122 | new_upgrade() { |
| 124 | - if [ ! -d "${sourcedir}" ]; then | ||
| 125 | - log "INFO" "no need to upgrade runtime files." | ||
| 126 | - return 0 | ||
| 127 | - fi | ||
| 128 | output_progress 10 | 123 | output_progress 10 |
| 129 | 124 | ||
| 130 | local setenv_option="" | 125 | local setenv_option="" |
| @@ -134,7 +129,7 @@ new_upgrade() { | |||
| 134 | 129 | ||
| 135 | # 执行安装 | 130 | # 执行安装 |
| 136 | custom_options="--custom-options=--common-parse-dir=$common_parse_dir,--logfile=$logfile,--stage=upgrade,--quiet=$is_quiet,--hetero-arch=$hetero_arch" | 131 | custom_options="--custom-options=--common-parse-dir=$common_parse_dir,--logfile=$logfile,--stage=upgrade,--quiet=$is_quiet,--hetero-arch=$hetero_arch" |
| 137 | - sh "$curpath/install_common_parser.sh" --package="runtime" --install --username="$username" --usergroup="$usergroup" --set-cann-uninstall --upgrade \ | 132 | + sh "$curpath/install_common_parser.sh" --copy_all --package="runtime" --install --username="$username" --usergroup="$usergroup" --set-cann-uninstall --upgrade \ |
| 138 | --version=$pkg_version --version-dir=$pkg_version_dir --use-share-info \ | 133 | --version=$pkg_version --version-dir=$pkg_version_dir --use-share-info \ |
| 139 | $setenv_option $in_install_for_all --docker-root="$docker_root" --chip="$chip_type" --feature="$feature_type" \ | 134 | $setenv_option $in_install_for_all --docker-root="$docker_root" --chip="$chip_type" --feature="$feature_type" \ |
| 140 | $custom_options "$common_parse_type" "$input_install_dir" "$curpath/filelist.csv" | 135 | $custom_options "$common_parse_type" "$input_install_dir" "$curpath/filelist.csv" |