Commit c07c4948 authored by Vitaly Lipatov's avatar Vitaly Lipatov

release_upgrade: skip confirm if there are no changes

parent 9bffe4d4
...@@ -64,8 +64,11 @@ __replace_alt_version_in_repo() ...@@ -64,8 +64,11 @@ __replace_alt_version_in_repo()
assure_exists apt-repo assure_exists apt-repo
#echo "Upgrading $DISTRNAME from $1 to $2 ..." #echo "Upgrading $DISTRNAME from $1 to $2 ..."
docmd apt-repo list | sed -e "s|\($1\)|{\1}->{$2}|g" | egrep --color -- "$1" docmd apt-repo list | sed -e "s|\($1\)|{\1}->{$2}|g" | egrep --color -- "$1"
confirm "Are these correct changes? [y/N]" || fatal "Exiting" # ask and replace only we will have changes
__replace_text_in_alt_repo "/^ *#/! s!$1!$2!g" if apt-repo list | egrep -q -- "$1" ; then
confirm "Are these correct changes? [y/N]" || fatal "Exiting"
__replace_text_in_alt_repo "/^ *#/! s!$1!$2!g"
fi
docmd apt-repo list docmd apt-repo list
} }
...@@ -166,6 +169,7 @@ __update_alt_to_next_distro() ...@@ -166,6 +169,7 @@ __update_alt_to_next_distro()
*) *)
warning "Have no idea how to update from $DISTRNAME $DISTRVERSION." warning "Have no idea how to update from $DISTRNAME $DISTRVERSION."
info "Try run f.i. # epm release-upgrade p8 or # epm release-upgrade Sisyphus" info "Try run f.i. # epm release-upgrade p8 or # epm release-upgrade Sisyphus"
info "Also possible you need install altlinux-release-p? package for correct distro version detecting"
return 1 return 1
esac esac
} }
......
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