Commit a617a215 authored by Vitaly Lipatov's avatar Vitaly Lipatov

improve dnf support

parent e15e4a85
......@@ -62,6 +62,9 @@ case $PMTYPE in
sudocmd yum remove $PKGLIST
done
;;
dnf-rpm)
sudocmd dnf autoremove
;;
# see autoorhans
#urpm-rpm)
# sudocmd urpme --auto-orphans
......
......@@ -63,7 +63,7 @@ case $PMTYPE in
return
fi
;;
urpm-rpm|zypper-rpm|yum-rpm)
urpm-rpm|zypper-rpm|yum-rpm|dnf-rpm)
if is_installed $pkg_names ; then
CMD="rpm -q --provides"
else
......
......@@ -68,7 +68,18 @@ case $PMTYPE in
CMD="rpm -q --requires"
;;
yum-rpm)
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)
CMD="pactree"
......
......@@ -49,9 +49,13 @@ case $PMTYPE in
docmd apt-file search $pkg_filenames
return ;;
yum-rpm)
# TODO
info "Search by full packages list does not realized"
CMD="yum provides"
;;
dnf-rpm)
# TODO
info "Search by full packages list does not realized"
CMD="dnf provides"
;;
urpm-rpm)
......
......@@ -40,6 +40,9 @@ case $PMTYPE in
yum-rpm)
CMD="repoquery --whatrequires"
;;
dnf-rpm)
CMD="repoquery --whatrequires"
;;
emerge)
assure_exists equery
CMD="equery depends -a"
......
......@@ -38,6 +38,9 @@ case $PMTYPE in
yum-rpm)
CMD="yum whatprovides"
;;
dnf-rpm)
CMD="yum provides"
;;
zypper-rpm)
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