3
# Copyright (C) 2019, 2022 Etersoft
4
# Copyright (C) 2019, 2022 Vitaly Lipatov <lav@etersoft.ru>
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
epm_full_upgrade_help()
22
get_help HELPCMD $SHAREDIR/epm-full_upgrade
24
You can run with --interactive if you can skip some steps interactivelyю
25
Also you can comment out full_upgrade parts in /etc/eepm/eepm.conf config.
27
epm full-upgrade [--interactive]
28
epm full-upgrade --no-flatpack
36
while [ -n "$1" ] ; do
38
"-h"|"--help"|"help") # HELPCMD: help
42
"--interactive") # HELPCMD: ask before every step
44
"--no-epm-play") # HELPCMD: skip epm play during full upgrade
45
full_upgrade_no_epm_play=1
47
"--no-flatpack") # HELPCMD: skip flatpack update during full upgrade
48
full_upgrade_no_flatpack=1
50
"--no-snap") # HELPCMD: skip snap update during full upgrade
51
full_upgrade_no_snap=1
53
"--no-kernel-update") # HELPCMD: skip kernel update during full upgrade
54
full_upgrade_no_kernel_update=1
56
"--no-clean") # HELPCMD: no clean after upgrade
57
full_upgrade_no_clean=1
65
[ -n "$interactive" ] || return 0
67
# call with a prompt string or use a default
68
read -r -p "${1:-Are you sure? [Y/n]} " response
79
confirm_action "Update repository info? [Y/n]" || full_upgrade_no_update=1
80
if [ -z "$full_upgrade_no_update" ] ; then
81
[ -n "$quiet" ] || echo
82
docmd epm update || fatal "repository updating is failed."
86
confirm_action "Do upgrade installed packages? [Y/n]" || full_upgrade_no_upgrade=1
87
if [ -z "$full_upgrade_no_upgrade" ] ; then
88
[ -n "$quiet" ] || echo
89
docmd epm $dryrun upgrade || fatal "upgrading of the system is failed."
93
confirm_action "Upgrade kernel and kernel modules? [Y/n]" || full_upgrade_no_kernel_update=1
94
if [ -z "$full_upgrade_no_kernel_update" ] ; then
95
[ -n "$quiet" ] || echo
96
docmd epm $dryrun update-kernel || fatal "updating of the kernel is failed."
99
# disable epm play --update for non ALT Systems
100
[ "$BASEDISTRNAME" = "alt" ] || full_upgrade_no_epm_play=1
103
confirm_action "Upgrade packages installed via epm play? [Y/n]" || full_upgrade_no_epm_play=1
104
if [ -z "$full_upgrade_no_epm_play" ] ; then
105
[ -n "$quiet" ] || echo
106
docmd epm $dryrun play --update all || fatal "updating of applications installed via epm play is failed."
110
if is_command flatpak ; then
111
confirm_action "Upgrade installed flatpak packages? [Y/n]" || full_upgrade_no_flatpak=1
112
if [ -z "$full_upgrade_no_flatpak" ] ; then
113
[ -n "$quiet" ] || echo
114
docmd flatpak update $(subst_option non_interactive --assumeyes) $(subst_option dryrun --no-deploy)
119
if is_command snap && serv snapd exists && serv snapd status >/dev/null ; then
120
confirm_action "Upgrade installed snap packages? [Y/n]" || full_upgrade_no_snap=1
121
if [ -z "$full_upgrade_no_snap" ] ; then
122
[ -n "$quiet" ] || echo
123
sudocmd snap refresh $(subst_option dryrun --list)
128
confirm_action "Do epm clean? [Y/n]" || full_upgrade_no_clean=1
129
if [ -z "$full_upgrade_no_clean" ] ; then
130
[ -n "$quiet" ] || echo
131
docmd epm $dryrun clean