Commit a617a215 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve dnf support

parent e15e4a85
...@@ -62,6 +62,9 @@ case $PMTYPE in ...@@ -62,6 +62,9 @@ case $PMTYPE in
sudocmd yum remove $PKGLIST sudocmd yum remove $PKGLIST
done done
;; ;;
dnf-rpm)
sudocmd dnf autoremove
;;
# see autoorhans # see autoorhans
#urpm-rpm) #urpm-rpm)
# sudocmd urpme --auto-orphans # sudocmd urpme --auto-orphans
......
...@@ -63,7 +63,7 @@ case $PMTYPE in ...@@ -63,7 +63,7 @@ case $PMTYPE in
return return
fi fi
;; ;;
urpm-rpm|zypper-rpm|yum-rpm) urpm-rpm|zypper-rpm|yum-rpm|dnf-rpm)
if is_installed $pkg_names ; then if is_installed $pkg_names ; then
CMD="rpm -q --provides" CMD="rpm -q --provides"
else else
......
...@@ -68,7 +68,18 @@ case $PMTYPE in ...@@ -68,7 +68,18 @@ case $PMTYPE in
CMD="rpm -q --requires" CMD="rpm -q --requires"
;; ;;
yum-rpm) yum-rpm)
CMD="yum deplist" if is_installed $pkg_names ; then
CMD="rpm -q --requires"
else
CMD="yum deplist"
fi
;;
dnf-rpm)
if is_installed $pkg_names ; then
CMD="rpm -q --requires"
else
CMD="dnf repoquery --requires"
fi
;; ;;
pacman) pacman)
CMD="pactree" CMD="pactree"
......
...@@ -49,9 +49,13 @@ case $PMTYPE in ...@@ -49,9 +49,13 @@ case $PMTYPE in
docmd apt-file search $pkg_filenames docmd apt-file search $pkg_filenames
return ;; return ;;
yum-rpm) yum-rpm)
# TODO
info "Search by full packages list does not realized"
CMD="yum provides" CMD="yum provides"
;; ;;
dnf-rpm) dnf-rpm)
# TODO
info "Search by full packages list does not realized"
CMD="dnf provides" CMD="dnf provides"
;; ;;
urpm-rpm) urpm-rpm)
......
...@@ -40,6 +40,9 @@ case $PMTYPE in ...@@ -40,6 +40,9 @@ case $PMTYPE in
yum-rpm) yum-rpm)
CMD="repoquery --whatrequires" CMD="repoquery --whatrequires"
;; ;;
dnf-rpm)
CMD="repoquery --whatrequires"
;;
emerge) emerge)
assure_exists equery assure_exists equery
CMD="equery depends -a" CMD="equery depends -a"
......
...@@ -38,6 +38,9 @@ case $PMTYPE in ...@@ -38,6 +38,9 @@ case $PMTYPE in
yum-rpm) yum-rpm)
CMD="yum whatprovides" CMD="yum whatprovides"
;; ;;
dnf-rpm)
CMD="yum provides"
;;
zypper-rpm) zypper-rpm)
CMD="zypper what-provides" CMD="zypper what-provides"
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment