firmware: do revision/patch and .0 version strips where they matter

This moves stripping to the functions it matters.  Also reduces diff
against stable.
This commit is contained in:
Franco Fichtner committed 2026-12-02 13:21:26 +01:00
1 parent 0a62361682
commit 205d0a34a7
5 files changed
+10 -6

No files matched your search

@@ -85,7 +85,7 @@
row['reason']+'</td><td>'+row['repository'] + '</td></tr>');
if (row['name'] == data['product_target'] && row['new'] != 'N/A') {
show_log = row['new'].replace(/[p_-].*/, '').replace(/\.0/, '');
show_log = row['new'];
}
});
$('#update_status_container').hide();
@@ -512,7 +512,7 @@
$("#changeloglist > thead").html("<tr><th>{{ lang._('Version') }}</th>" +
"<th>{{ lang._('Date') }}</th><th></th></tr>");
const installed_version = data['product_version'].replace(/[p_-].*/, '').replace(/\.0/, '');
const installed_version = data['product_version'].replace(/[p_].*/, '').replace(/\.0/, '');
$.each(data['changelog'], function(index, row) {
changelog_count += 1;
@@ -30,9 +30,11 @@
$changelogfile = '/usr/local/opnsense/changelog/index.json';
if (!empty($argv[1]) && ($ret = json_decode(@file_get_contents($changelogfile), true)) != null) {
$version = preg_split('/\.0|[p_-]/', $argv[1])[0];
foreach ($ret as $entry) {
if ($entry['version'] == $argv[1]) {
if ($entry['version'] == $version) {
echo $entry['date'] . PHP_EOL;
break;
}
}
}
+3 -1
View File
@@ -79,7 +79,9 @@ changelog_show()
}
COMMAND=${1}
VERSION=${2}
VERSION=${2%%[p_]*}
VERSION=${VERSION%%.0}
if [ "${COMMAND}" = "fetch" ]; then
changelog_fetch
+1 -1
View File
@@ -36,7 +36,7 @@ RQUERY=$(${PKG} rquery %v opnsense-update 2> /dev/null)
# We do not check for downloads here to make sure the actual version
# we want is actually there. The whole point of this script is a
# hint to the console to reboot. Worst case we are wrong and the
# reboot doesn't happen. The GUI offers more precise info about it.
# reboot doesn't happen. The GUI offers precise info about it.
if [ -n "${LQUERY}" -a -n "${RQUERY}" -a "${LQUERY%%_*}" != "${RQUERY%%_*}" ]; then
WANT_REBOOT=0
+1 -1
View File
@@ -112,7 +112,7 @@ esac
echo
if [ -n "${CHANGELOG}" ]; then
CHANGELOG=$(configctl firmware changelog text ${CHANGELOG%%_*})
CHANGELOG=$(configctl firmware changelog text ${CHANGELOG})
fi
if [ -n "${CHANGELOG}" ]; then
echo "${CHANGELOG}" | less -P "Viewing release notes - press UP/DOWN to read, 'q' to continue"