Commit fb09d42a authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm full-upgrade: add support for usrmerge (filesystem 3.1)

parent 5013eb55
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2019, 2022 Etersoft # Copyright (C) 2019, 2022, 2024 Etersoft
# Copyright (C) 2019, 2022 Vitaly Lipatov <lav@etersoft.ru> # Copyright (C) 2019, 2022, 2024 Vitaly Lipatov <lav@etersoft.ru>
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU Affero General Public License as published by
...@@ -17,6 +17,19 @@ ...@@ -17,6 +17,19 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
__check_upgrade_conditions()
{
[ "$BASEDISTRNAME" = "alt" ] || return 0
[ "$DISTRVERSION" = "Sisyphus" ] || return 0
# https://www.altlinux.org/Usrmerge
epm status --installed filesystem 3.1 && return 0
info "Installing usrmerge-hier-convert to merge file hierarhy, check https://www.altlinux.org/Usrmerge."
epm upgrade vim-minimal vim-console
epm install usrmerge-hier-convert
return 0
}
epm_full_upgrade_help() epm_full_upgrade_help()
{ {
get_help HELPCMD $SHAREDIR/epm-full_upgrade get_help HELPCMD $SHAREDIR/epm-full_upgrade
...@@ -90,6 +103,7 @@ confirm_action() ...@@ -90,6 +103,7 @@ confirm_action()
confirm_action "Do upgrade installed packages? [Y/n]" || full_upgrade_no_upgrade=1 confirm_action "Do upgrade installed packages? [Y/n]" || full_upgrade_no_upgrade=1
if [ -z "$full_upgrade_no_upgrade" ] ; then if [ -z "$full_upgrade_no_upgrade" ] ; then
[ -n "$quiet" ] || echo [ -n "$quiet" ] || echo
__check_upgrade_conditions || fatal "upgrade conditions is not satisfied."
docmd epm $dryrun upgrade || fatal "upgrading of the system is failed." docmd epm $dryrun upgrade || fatal "upgrading of the system is failed."
fi fi
......
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