[pve-devel] [PATCH widget-toolkit 1/5] apt repositories: actually ignore ignore-pre-upgrade-warning

Fiona Ebner f.ebner at proxmox.com
Mon Jun 5 17:43:09 CEST 2023


when upgrading is possible rather than throwing an error by reaching
the else branch.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/node/APTRepositories.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js
index 1fb627c..cb08bb6 100644
--- a/src/node/APTRepositories.js
+++ b/src/node/APTRepositories.js
@@ -654,10 +654,12 @@ Ext.define('Proxmox.node.APTRepositories', {
 
 		    if (info.kind === 'origin') {
 			infos[path][idx].origin = info.message;
-		    } else if (info.kind === 'warning' ||
-			(info.kind === 'ignore-pre-upgrade-warning' && !repoGrid.majorUpgradeAllowed)
-		    ) {
+		    } else if (info.kind === 'warning') {
 			infos[path][idx].warnings.push(info);
+		    } else if (info.kind === 'ignore-pre-upgrade-warning') {
+			if (!repoGrid.majorUpgradeAllowed) {
+			    infos[path][idx].warnings.push(info);
+			}
 		    } else {
 			throw 'unknown info';
 		    }
-- 
2.39.2






More information about the pve-devel mailing list