From 40494a907a78ee718c77d51f2a51c75376ffceda Mon Sep 17 00:00:00 2001
From: Vitaly Lipatov <lav@altlinux.ru>
Date: Sat, 28 Aug 2021 21:46:29 +0300
Subject: [PATCH] epm-downgrade: use epm-upgrade for apt-rpm PMTYPE, instead of
 direct apt-get dist-upgrade

---
 bin/epm-downgrade | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/bin/epm-downgrade b/bin/epm-downgrade
index b7f1a30..716868a 100644
--- a/bin/epm-downgrade
+++ b/bin/epm-downgrade
@@ -73,11 +73,8 @@ epm_downgrade()
 	apt-rpm)
 		local APTOPTIONS="$(subst_option non_interactive -y)"
 		__epm_add_alt_apt_downgrade_preferences || return
-		if [ -n "$pkg_filenames" ] ; then
-			sudocmd apt-get $APTOPTIONS install $pkg_filenames
-		else
-			sudocmd apt-get $APTOPTIONS dist-upgrade
-		fi
+		load_helper epm-upgrade
+		epm_upgrade "$@"
 		__epm_remove_apt_downgrade_preferences
 		;;
 	apt-dpkg)
-- 
2.24.1