浏览代码

Allow broken depenencies with dnf

bryan 3 年之前
父节点
当前提交
1903ed4465
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      installJRMC

+ 6 - 1
installJRMC

@@ -426,7 +426,7 @@ installPackage() {
     local -a _pkg_array _install_flags
     local _pkg _nocheck _silent _return
 
-    if _input=$(getopt -o +s -l nocheck,nogpgcheck,silent -- "$@"); then
+    if _input=$(getopt -o +s -l nocheck,nogpgcheck,skip-broken,silent -- "$@"); then
         eval set -- "$_input"
         while true; do
             case "$1" in
@@ -440,6 +440,11 @@ installPackage() {
                         _install_flags+=("--allow-unsigned-rpm")
                     fi
                     ;;
+                --skip-broken)
+                    if [[ "$ID" =~ ^(fedora|centos)$ ]]; then
+                        _install_flags+=("--skip-broken")
+                    fi
+                    ;;
                 --silent|-s)
                     _silent=true
                     ;;