Commit d4120392 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-release_upgrade: fix messages

parent 4e3eb821
...@@ -274,8 +274,8 @@ __switch_alt_to_distro() ...@@ -274,8 +274,8 @@ __switch_alt_to_distro()
docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm update-kernel docmd epm update-kernel
info "Run epm release-upgrade again for update to p8" info "Run epm release-upgrade again for update to p8"
;; ;;
...@@ -284,8 +284,8 @@ __switch_alt_to_distro() ...@@ -284,8 +284,8 @@ __switch_alt_to_distro()
docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check the errors and run '# epm release-upgrade' again"
__check_system __check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
info "Run epm release-upgrade again for update to p9" info "Run epm release-upgrade again for update to p9"
...@@ -295,8 +295,8 @@ __switch_alt_to_distro() ...@@ -295,8 +295,8 @@ __switch_alt_to_distro()
docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check the errors and run '# epm release-upgrade' again"
__check_system __check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
;; ;;
...@@ -305,13 +305,13 @@ __switch_alt_to_distro() ...@@ -305,13 +305,13 @@ __switch_alt_to_distro()
docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
if epm installed libcrypt >/dev/null ; then if epm installed libcrypt >/dev/null ; then
# glibc-core coflicts libcrypt # glibc-core coflicts libcrypt
docmd epm downgrade apt pam pam0_passwdqc glibc-core libcrypt- || fatal docmd epm downgrade apt pam pam0_passwdqc glibc-core libcrypt- || fatal
fi fi
docmd epm downgrade docmd epm downgrade
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check the errors and run '# epm release-upgrade' again"
__check_system __check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
;; ;;
...@@ -324,8 +324,8 @@ __switch_alt_to_distro() ...@@ -324,8 +324,8 @@ __switch_alt_to_distro()
fi fi
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
__check_system __check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
info "Run epm release-upgrade again for update to p10" info "Run epm release-upgrade again for update to p10"
...@@ -338,8 +338,8 @@ __switch_alt_to_distro() ...@@ -338,8 +338,8 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
echo '%_priority_distbranch p10' >/etc/rpm/macros.d/p10 echo '%_priority_distbranch p10' >/etc/rpm/macros.d/p10
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again" docmd epm upgrade || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm install rpm apt "$(get_fix_release_pkg "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
__check_system __check_system
docmd epm update-kernel -t std-def || fatal docmd epm update-kernel -t std-def || fatal
;; ;;
...@@ -348,7 +348,7 @@ __switch_alt_to_distro() ...@@ -348,7 +348,7 @@ __switch_alt_to_distro()
docmd epm install "$(get_fix_release_pkg "$FROM")" || fatal docmd epm install "$(get_fix_release_pkg "$FROM")" || fatal
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
if epm installed libcrypt >/dev/null ; then if epm installed libcrypt >/dev/null ; then
# glibc-core coflicts libcrypt # glibc-core coflicts libcrypt
docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal
...@@ -362,7 +362,7 @@ __switch_alt_to_distro() ...@@ -362,7 +362,7 @@ __switch_alt_to_distro()
docmd epm install "$(get_fix_release_pkg "$FROM")" || fatal docmd epm install "$(get_fix_release_pkg "$FROM")" || fatal
__switch_repo_to $TO __switch_repo_to $TO
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
#if epm installed libcrypt >/dev/null ; then #if epm installed libcrypt >/dev/null ; then
# # glibc-core coflicts libcrypt # # glibc-core coflicts libcrypt
# docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal # docmd epm downgrade apt rpm pam pam0_passwdqc glibc-core libcrypt- || fatal
...@@ -377,7 +377,7 @@ __switch_alt_to_distro() ...@@ -377,7 +377,7 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
rm -fv /etc/rpm/macros.d/p10 rm -fv /etc/rpm/macros.d/p10
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm downgrade rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm downgrade docmd epm downgrade
__check_system __check_system
docmd epm upgrade || fatal docmd epm upgrade || fatal
...@@ -388,7 +388,7 @@ __switch_alt_to_distro() ...@@ -388,7 +388,7 @@ __switch_alt_to_distro()
__switch_repo_to $TO __switch_repo_to $TO
[ "$TO" = "p10" ] && echo '%_priority_distbranch p10' >/etc/rpm/macros.d/p10 [ "$TO" = "p10" ] && echo '%_priority_distbranch p10' >/etc/rpm/macros.d/p10
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
docmd epm downgrade docmd epm downgrade
__check_system __check_system
docmd epm upgrade || fatal docmd epm upgrade || fatal
...@@ -401,11 +401,11 @@ __switch_alt_to_distro() ...@@ -401,11 +401,11 @@ __switch_alt_to_distro()
__alt_repofix "alt" __alt_repofix "alt"
[ -s /etc/rpm/macros.d/p10 ] && rm -fv /etc/rpm/macros.d/p10 [ -s /etc/rpm/macros.d/p10 ] && rm -fv /etc/rpm/macros.d/p10
__epm_ru_update || fatal __epm_ru_update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again" docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check the errors and run '# epm release-upgrade' again"
#local ADDPKG #local ADDPKG
#ADDPKG=$(epm -q --short make-initrd sssd-ad 2>/dev/null) #ADDPKG=$(epm -q --short make-initrd sssd-ad 2>/dev/null)
#docmd epm install librpm7 librpm rpm apt $ADDPKG "$(get_fix_release_pkg --force "$TO")" ConsoleKit2- || fatal "Check an error and run again" #docmd epm install librpm7 librpm rpm apt $ADDPKG "$(get_fix_release_pkg --force "$TO")" ConsoleKit2- || fatal "Check an error and run again"
docmd epm upgrade || fatal "Check an error and run epm release-upgrade or just epm upgrade again" docmd epm upgrade || fatal "Check the error and run '# epm release-upgrade' or just '# epm upgrade' again"
__check_system __check_system
docmd epm update-kernel || fatal docmd epm update-kernel || fatal
;; ;;
...@@ -413,7 +413,7 @@ __switch_alt_to_distro() ...@@ -413,7 +413,7 @@ __switch_alt_to_distro()
if [ "$FROM" = "$TO" ] ; then if [ "$FROM" = "$TO" ] ; then
info "It seems your system is already updated to newest $DISTRNAME $TO" info "It seems your system is already updated to newest $DISTRNAME $TO"
else else
warning "Have no idea how to switch from $DISTRNAME $FROM to $DISTRNAME $TO." warning "Unknown distro version. Have no idea how to switch from $DISTRNAME $FROM to $DISTRNAME $TO."
fi fi
info "Try run f.i. # epm release-upgrade p10 or # epm release-upgrade Sisyphus" info "Try run f.i. # epm release-upgrade p10 or # epm release-upgrade Sisyphus"
info "Also possible you need install altlinux-release-p? package for correct distro version detecting" info "Also possible you need install altlinux-release-p? package for correct distro version detecting"
...@@ -421,8 +421,8 @@ __switch_alt_to_distro() ...@@ -421,8 +421,8 @@ __switch_alt_to_distro()
return 1 return 1
esac esac
epm clean epm clean
info "Note: You can try epm autoremove and epm autoorphans commands to remove obsoleted and unused packages." info "Note: Also you can try '# epm autoremove' and '# epm autoorphans' commands to remove obsoleted and unused packages."
info "Done. The system has been successfully upgraded to the next release." info "Done. The system has been successfully upgraded to the next release '$TO'."
trap - EXIT trap - EXIT
} }
......
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