Skip to content

Commit f08fbce

Browse files
committed
move --allow-releaseinfo-change to the update script
add --fix-broken for old image
1 parent c304c51 commit f08fbce

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

rtkbase_update.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ upd_2.4.2() {
308308
echo '####################'
309309
echo 'Update from 2.4.2'
310310
echo '####################'
311+
apt-get update -y --allow-releaseinfo-change
312+
apt-get --fix-broken install # needed for old installation (raspi image v2.1 from july 2020)
311313
${destination_directory}/tools/install.sh --user "${standard_user}" --dependencies --rtkbase-requirements --unit-files
312314
#upgrade rtklib to b34h
313315
upgrade_rtklib
@@ -320,16 +322,18 @@ upd_2.4.2() {
320322
[ $str2str_rtcm = 'active' ] && systemctl start str2str_rtcm_svr
321323
[ $str2str_serial = 'active' ] && systemctl start str2str_rtcm_serial
322324
[ $str2str_file = 'active' ] && systemctl start str2str_file
325+
return 0
323326
}
324327

325328
#check if we can apply the update
326329
#FOR THE OLDER ME -> Don't forget to modify the os detection if there is a 2.5.x release !!!
327330
[[ $checking == '--checking' ]] && check_before_update
328331

329-
# standard update
330-
update
332+
echo 'Starting standard update'
333+
update || { echo 'Update failed (update)' ; exit 1 ;}
331334
# calling specific update function. If we are using v2.2.5, it will call the function upd_2.2.5
332-
upd_"${old_version/b*/b}" "$@"
335+
echo 'Starting specific update'
336+
upd_"${old_version/b*/b}" "$@" || { echo 'Update failed (upd_release_number)' ; exit 1 ;}
333337
#note for older me:
334338
#When dealing with beta version, "${oldversion/b*/b}" will call function 2.4b when we use a release 2.4b1 or 2.4b2 or 2.4beta99
335339

tools/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ install_dependencies() {
103103
echo '################################'
104104
echo 'INSTALLING DEPENDENCIES'
105105
echo '################################'
106-
apt-get "${APT_TIMEOUT}" update -y --allow-releaseinfo-change || exit 1
106+
apt-get "${APT_TIMEOUT}" update -y || exit 1
107107
apt-get "${APT_TIMEOUT}" install -y git build-essential pps-tools python3-pip python3-venv python3-dev python3-setuptools python3-wheel python3-serial libsystemd-dev bc dos2unix socat zip unzip pkg-config psmisc proj-bin || exit 1
108108
apt-get install -y libxml2-dev libxslt-dev || exit 1 # needed for lxml (for pystemd)
109109
#apt-get "${APT_TIMEOUT}" upgrade -y

0 commit comments

Comments
 (0)