Kaynağa Gözat

Selective reinstall with dnf

bryan 1 gün önce
ebeveyn
işleme
3f5b61e7dc
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      installJRMC

+ 3 - 1
installJRMC

@@ -516,7 +516,9 @@ install_package() {
       ((allow_downgrades)) && install_flags+=(--allowerasing)
       ((no_gpg_check)) && install_flags+=(--nogpgcheck)
       ((refresh)) && install_flags+=(--refresh)
-      ((reinstall)) && PKG_INSTALL=("${PKG_INSTALL[@]/install/reinstall}")
+      if ((reinstall)) && [[ ${#pkg_array[@]} -eq 1 ]] && "${PKG_QUERY[@]}" "${pkg_array[0]}" &>/dev/null; then
+        PKG_INSTALL=("${PKG_INSTALL[@]/install/reinstall}")
+      fi
       ;;
     suse)
       ((no_gpg_check)) && install_flags+=(--allow-unsigned-rpm) ;;