Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

falter-berlin-autoupdate: if possible, use --ignore-minor-compat-version #440

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/falter-berlin-autoupdate/files/autoupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,13 @@ if semverLT "$FREIFUNK_RELEASE" "$latest_release"; then
if [ -n "$OPT_N" ]; then
sysupgrade -n "$PATH_BIN"
else
sysupgrade "$PATH_BIN"
check_ignore_minor_compat
ret_code=$?
if [ $ret_code = 0 ]; then
sysupgrade --ignore-minor-compat-version "$PATH_BIN"
else
sysupgrade "$PATH_BIN"
fi
fi
log "done."
fi
Expand Down
11 changes: 11 additions & 0 deletions packages/falter-berlin-autoupdate/files/lib_autoupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,14 @@ min_valid_certificates() {

return $cert_cnt
}

check_ignore_minor_compat() {
# checks if the installed sysupgrade tool supports the option
# --ignore-minor-compat-version already.
# returns 0 if option is available, 1 otherwise
if sysupgrade -h | grep -q 'ignore-minor-compat-version'; then
return 0
else
return 1
fi
}
Loading