Commit 753b572b authored by Vitaly Lipatov's avatar Vitaly Lipatov

support release upgrade for p9

parent 7ec3aaa6
#!/bin/sh
#
# Copyright (C) 2013, 2016, 2017 Etersoft
# Copyright (C) 2013, 2016, 2017 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2013, 2016, 2017, 2019 Etersoft
# Copyright (C) 2013, 2016, 2017, 2019 Vitaly Lipatov <lav@etersoft.ru>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
......@@ -150,7 +150,7 @@ __update_to_the_distro()
docmd epm update || fatal
docmd epm upgrade || fatal "Check an error and run epm release-upgrade again"
;;
p8)
p8|p9)
docmd epm update || fatal
docmd epm install rpm apt "$(get_fix_release_pkg --force "$TO")" || fatal "Check an error and run epm release-upgrade again"
__alt_repofix
......@@ -211,7 +211,17 @@ __update_alt_to_next_distro()
docmd epm downgrade || fatal
info "Done."
;;
"p8 Sisyphus"|"Sisyphus Sisyphus")
"Sisyphus p9")
TO="p9"
confirm_info "Downgrade $DISTRNAME from $FROM to $TO ..."
docmd epm install "$(get_fix_release_pkg "$FROM")" || fatal
__replace_alt_version_in_repo "$FROM/" "$TO/branch/"
__replace_text_in_alt_repo "/^ *#/! s!\[alt\]![$TO]!g"
__update_to_the_distro $TO
docmd epm downgrade || fatal
info "Done."
;;
"p8 Sisyphus"|"p9 Sisyphus"|"Sisyphus Sisyphus")
TO="Sisyphus"
confirm_info "Upgrade $DISTRNAME from $FROM to $TO ..."
docmd epm install rpm apt "$(get_fix_release_pkg "$FROM")" || fatal
......@@ -258,15 +268,18 @@ epm_release_upgrade()
fi
fi
__alt_repofix
# check forced target
if [ -n "$pkg_filenames" ] ; then
[ "$(__wcount $pkg_filenames)" = "1" ] || fatal "Too many args: $pkg_filenames"
fi
TARGET="$pkg_filenames"
__alt_repofix
# TODO: ask before upgrade
__update_alt_to_next_distro $DISTRVERSION $pkg_filenames
__update_alt_to_next_distro $DISTRVERSION $TARGET
return
;;
*)
......
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