* [pve-devel] [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text
@ 2023-06-09 14:16 Fiona Ebner
2023-06-09 14:16 ` [pve-devel] [PATCH widget-toolkit 2/2] apt repositories: avoid potential type error in classifyOrigin helper Fiona Ebner
2023-06-09 15:35 ` [pve-devel] applied-series: Re: [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2023-06-09 14:16 UTC (permalink / raw)
To: pve-devel
Could lead to a type error with classifyOrigin when there is a
repository that doesn't have an InRelease file and cannot be detected
as Debian/Proxmox origin from its URL. For me, it triggered with the
element.io repository after changing to bookworm (which currently
doesn't exist yet) and running apt update.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
Not too difficult to run into with external repos during upgrade
preparation (when they are not yet bookworm-ready), so might also be
worth it for the stable branch?
src/node/APTRepositories.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js
index cba9271..47c0a2c 100644
--- a/src/node/APTRepositories.js
+++ b/src/node/APTRepositories.js
@@ -697,7 +697,7 @@ Ext.define('Proxmox.node.APTRepositories', {
repo.Path = file.path;
repo.Index = n;
if (infos[file.path] && infos[file.path][n]) {
- repo.Origin = infos[file.path][n].origin || Proxmox.Utils.UnknownText;
+ repo.Origin = infos[file.path][n].origin || Proxmox.Utils.unknownText;
repo.warnings = infos[file.path][n].warnings || [];
if (repo.Enabled) {
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] [PATCH widget-toolkit 2/2] apt repositories: avoid potential type error in classifyOrigin helper
2023-06-09 14:16 [pve-devel] [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text Fiona Ebner
@ 2023-06-09 14:16 ` Fiona Ebner
2023-06-09 15:35 ` [pve-devel] applied-series: Re: [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2023-06-09 14:16 UTC (permalink / raw)
To: pve-devel
with undefined (or otherwise falsy) argument.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/node/APTRepositories.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js
index 47c0a2c..016118e 100644
--- a/src/node/APTRepositories.js
+++ b/src/node/APTRepositories.js
@@ -406,6 +406,7 @@ Ext.define('Proxmox.node.APTRepositories', {
product: 'Proxmox VE', // default
classifyOrigin: function(origin) {
+ origin ||= '';
if (origin.match(/^\s*Proxmox\s*$/i)) {
return 'Proxmox';
} else if (origin.match(/^\s*Debian\s*(:?Backports)?$/i)) {
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied-series: Re: [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text
2023-06-09 14:16 [pve-devel] [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text Fiona Ebner
2023-06-09 14:16 ` [pve-devel] [PATCH widget-toolkit 2/2] apt repositories: avoid potential type error in classifyOrigin helper Fiona Ebner
@ 2023-06-09 15:35 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2023-06-09 15:35 UTC (permalink / raw)
To: Proxmox VE development discussion, Fiona Ebner
On 09/06/2023 16:16, Fiona Ebner wrote:
> Could lead to a type error with classifyOrigin when there is a
> repository that doesn't have an InRelease file and cannot be detected
> as Debian/Proxmox origin from its URL. For me, it triggered with the
> element.io repository after changing to bookworm (which currently
> doesn't exist yet) and running apt update.
>
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>
> Not too difficult to run into with external repos during upgrade
> preparation (when they are not yet bookworm-ready), so might also be
> worth it for the stable branch?
>
> src/node/APTRepositories.js | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied both patches to master for now, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-09 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 14:16 [pve-devel] [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text Fiona Ebner
2023-06-09 14:16 ` [pve-devel] [PATCH widget-toolkit 2/2] apt repositories: avoid potential type error in classifyOrigin helper Fiona Ebner
2023-06-09 15:35 ` [pve-devel] applied-series: Re: [PATCH widget-toolkit 1/2] apt repositories: fix typo for getting the default unknown text Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox