fix: 更新rpm安装命令,添加--nosignature、--nodeps和--replacepkgs选项
This commit is contained in:
@@ -240,7 +240,7 @@ func (r NeVersion) operateCommand(action, neType string, neFilePaths []string) (
|
||||
pkgCmdStr := fmt.Sprintf("sudo dpkg -i %s", strings.Join(neFilePaths, " "))
|
||||
fileExt := filepath.Ext(strings.ToLower(neFilePaths[0]))
|
||||
if strings.HasSuffix(fileExt, "rpm") {
|
||||
pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --reinstall %s", strings.Join(neFilePaths, " "))
|
||||
pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --nosignature --nodeps --replacepkgs %s", strings.Join(neFilePaths, " "))
|
||||
}
|
||||
|
||||
// 组合命令输入
|
||||
@@ -258,7 +258,7 @@ func (r NeVersion) operateCommand(action, neType string, neFilePaths []string) (
|
||||
// 升级软件包
|
||||
pkgCmdStr = fmt.Sprintf("sudo dpkg -i %s", strings.Join(neFilePaths, " "))
|
||||
if strings.HasSuffix(fileExt, "rpm") {
|
||||
pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --reinstall %s", strings.Join(neFilePaths, " "))
|
||||
pkgCmdStr = fmt.Sprintf("sudo rpm -Uvh --nosignature --nodeps --replacepkgs %s", strings.Join(neFilePaths, " "))
|
||||
}
|
||||
omcStrArr = append(omcStrArr, pkgCmdStr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user