Commit 71cd408e authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm release-upgrade/downgrade: update supported ALT branches

parent 847f5e22
......@@ -29,6 +29,8 @@ get_prev_release()
echo "p8" ;;
"p10")
echo "p9" ;;
"p11")
echo "p10" ;;
"c7")
echo "c6" ;;
"c8")
......@@ -41,6 +43,8 @@ get_prev_release()
echo "c8" ;;
"c9f2")
echo "c9f1" ;;
"c10f2")
echo "c10f1" ;;
"10")
echo "9" ;;
*)
......
......@@ -81,8 +81,8 @@ __detect_alt_release_by_repo()
{
local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list \
| grep -v "^#" \
| grep -E "[tpc][5-9]\.?[0-9]?/branch/" \
| sed -e "s|.*\([tpc][5-9]\.\?[0-9]\?\)/branch.*|\1|g" \
| grep -E "[tpc][1-3]?[5-9][f.]?[0-9]?/branch/" \
| sed -e "s|.*\([tpc][1-3]\?[5-9][f.]\?[0-9]\?\)/branch.*|\1|g" \
| sort -u )
if [ "$(__wcount $BRD)" = "1" ] ; then
echo "$BRD"
......@@ -250,6 +250,8 @@ get_next_release()
echo "p9" ;;
"p9")
echo "p10" ;;
"p10")
echo "p11" ;;
"c6")
echo "c7" ;;
"c7")
......@@ -262,6 +264,8 @@ get_next_release()
echo "c9f2" ;;
"c9f1")
echo "c9f2" ;;
"c10f1")
echo "c10f2" ;;
*)
echo "$FROM" ;;
esac
......@@ -343,7 +347,7 @@ __switch_alt_to_distro()
docmd epm update-kernel || fatal
info "Run epm release-upgrade again for update to p10"
;;
"p9"|"p9 p10"|"p10 p10")
"p9"|"p9 p10"|"p10 p10"|"p10 p11")
info "Upgrade all packages to current $FROM repository"
__do_upgrade
confirm_info "Upgrade $DISTRNAME from $FROM to $TO ..."
......@@ -383,7 +387,7 @@ __switch_alt_to_distro()
__check_system "$TO"
docmd epm upgrade || fatal
;;
"p10 p9")
"p10 p9"|"p11 p9")
confirm_info "Downgrade $DISTRNAME from $FROM to $TO ..."
docmd epm install $(get_fix_release_pkg "$FROM")
__switch_repo_to $TO
......@@ -393,7 +397,7 @@ __switch_alt_to_distro()
__check_system "$TO"
docmd epm upgrade || fatal
;;
"Sisyphus p8"|"Sisyphus p9"|"Sisyphus p10"|"Sisyphus c8"|"Sisyphus c8.1"|"Sisyphus c9f2")
"Sisyphus p8"|"Sisyphus p9"|"Sisyphus p10"|"Sisyphus c8"|"Sisyphus c8.1"|"Sisyphus c9f2"|"Sisyphus c10f1"|"Sisyphus c10f2")
confirm_info "Downgrade $DISTRNAME from $FROM to $TO ..."
docmd epm install $(get_fix_release_pkg "$FROM")
__switch_repo_to $TO
......@@ -403,7 +407,7 @@ __switch_alt_to_distro()
__check_system "$TO"
docmd epm upgrade || fatal
;;
"p8 Sisyphus"|"p9 Sisyphus"|"p10 Sisyphus"|"10 Sisyphus"|"Sisyphus Sisyphus")
"p8 Sisyphus"|"p9 Sisyphus"|"p10 Sisyphus"|"p11 Sisyphus"|"10 Sisyphus"|"Sisyphus Sisyphus")
confirm_info "Upgrade $DISTRNAME from $FROM to $TO ..."
docmd epm install rpm apt $(get_fix_release_pkg "$FROM") || fatal
docmd epm upgrade || fatal
......@@ -411,6 +415,7 @@ __switch_alt_to_distro()
__replace_alt_version_in_repo "$FROM/branch/" "$TO/"
__alt_repofix "alt"
[ -s /etc/rpm/macros.d/p10 ] && rm -fv /etc/rpm/macros.d/p10
[ -s /etc/rpm/macros.d/p11 ] && rm -fv /etc/rpm/macros.d/p11
__epm_ru_update || fatal
docmd epm fix || fatal
docmd epm install $(get_fix_release_pkg --force "$TO") || fatal "Check the errors and run '# epm release-upgrade' again"
......
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