* [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex
@ 2022-02-24 14:21 Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH manager 2/4] parse node " Stefan Sterz
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Stefan Sterz @ 2022-02-24 14:21 UTC (permalink / raw)
To: pve-devel
To be consistent with PBS's implementation of multi-line comments
remove "\s*" here too. Since the regex isn't lazy .* matches
everything \s* would anyway. (Note that new lines occurs after "$").
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
data/PVE/DataCenterConfig.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/PVE/DataCenterConfig.pm b/data/PVE/DataCenterConfig.pm
index 6c0fa5b..8e51ba3 100644
--- a/data/PVE/DataCenterConfig.pm
+++ b/data/PVE/DataCenterConfig.pm
@@ -236,7 +236,7 @@ sub parse_datacenter_config {
# description may be comment or key-value pair (or both)
my $comment = '';
for my $line (split(/\n/, $raw)) {
- if ($line =~ /^\#(.*)\s*$/) {
+ if ($line =~ /^\#(.*)$/) {
$comment .= PVE::Tools::decode_text($1) . "\n";
}
}
--
2.30.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [pve-devel] [PATCH manager 2/4] parse node config: remove "\s*" from comment regex
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex Stefan Sterz
@ 2022-02-24 14:21 ` Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH container 3/4] parse pct config: remove "\s*" from multi-line " Stefan Sterz
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Sterz @ 2022-02-24 14:21 UTC (permalink / raw)
To: pve-devel
To be consistent with PBS's implementation of multi-line comments
remove "\s*" here too. Since the regex isn't lazy .* matches
everything \s* would anyway. (Note that new lines occurs after "$").
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
PVE/NodeConfig.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/NodeConfig.pm b/PVE/NodeConfig.pm
index df44410f..4c2fc570 100644
--- a/PVE/NodeConfig.pm
+++ b/PVE/NodeConfig.pm
@@ -205,7 +205,7 @@ sub parse_node_config {
my @lines = split(/\n/, $content);
foreach my $line (@lines) {
- if ($line =~ /^\#(.*)\s*$/ || $line =~ /^description:\s*(.*\S)\s*$/) {
+ if ($line =~ /^\#(.*)$/ || $line =~ /^description:\s*(.*\S)\s*$/) {
$descr .= PVE::Tools::decode_text($1) . "\n";
next;
}
--
2.30.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [pve-devel] [PATCH container 3/4] parse pct config: remove "\s*" from multi-line comment regex
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH manager 2/4] parse node " Stefan Sterz
@ 2022-02-24 14:21 ` Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH qemu-server 4/4] parse vm " Stefan Sterz
2022-04-27 6:56 ` [pve-devel] applied-series: [PATCH cluster 1/4] parse datacenter config: remove "\s*" from " Thomas Lamprecht
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Sterz @ 2022-02-24 14:21 UTC (permalink / raw)
To: pve-devel
To be consistent with PBS's implementation of multi-line comments
remove "\s*" here too. Since the regex isn't lazy .* matches
everything \s* would anyway. (Note that new lines occurs after "$").
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
src/PVE/LXC/Config.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 0ed7bd2..548f07c 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -943,7 +943,7 @@ sub parse_pct_config {
next;
}
- if ($line =~ m/^\#(.*)\s*$/) {
+ if ($line =~ m/^\#(.*)$/) {
$descr .= PVE::Tools::decode_text($1) . "\n";
next;
}
--
2.30.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [pve-devel] [PATCH qemu-server 4/4] parse vm config: remove "\s*" from multi-line comment regex
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH manager 2/4] parse node " Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH container 3/4] parse pct config: remove "\s*" from multi-line " Stefan Sterz
@ 2022-02-24 14:21 ` Stefan Sterz
2022-04-27 9:21 ` Thomas Lamprecht
2022-04-27 6:56 ` [pve-devel] applied-series: [PATCH cluster 1/4] parse datacenter config: remove "\s*" from " Thomas Lamprecht
3 siblings, 1 reply; 6+ messages in thread
From: Stefan Sterz @ 2022-02-24 14:21 UTC (permalink / raw)
To: pve-devel
To be consistent with PBS's implementation of multi-line comments
remove "\s*" here too. Since the regex isn't lazy .* matches
everything \s* would anyway. (Note that new lines occurs after "$").
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
PVE/QemuServer.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 243c2e5..79900e8 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1,4 +1,4 @@
-package PVE::QemuServer;
+rpackage PVE::QemuServer;
use strict;
use warnings;
@@ -2366,7 +2366,7 @@ sub parse_vm_config {
next;
}
- if ($line =~ m/^\#(.*)\s*$/) {
+ if ($line =~ m/^\#(.*)$/) {
$descr = '' if !defined($descr);
$descr .= PVE::Tools::decode_text($1) . "\n";
next;
--
2.30.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [pve-devel] applied-series: [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex Stefan Sterz
` (2 preceding siblings ...)
2022-02-24 14:21 ` [pve-devel] [PATCH qemu-server 4/4] parse vm " Stefan Sterz
@ 2022-04-27 6:56 ` Thomas Lamprecht
3 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2022-04-27 6:56 UTC (permalink / raw)
To: Proxmox VE development discussion, Stefan Sterz
On 24.02.22 15:21, Stefan Sterz wrote:
> To be consistent with PBS's implementation of multi-line comments
> remove "\s*" here too. Since the regex isn't lazy .* matches
> everything \s* would anyway. (Note that new lines occurs after "$").
>
> Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
> ---
> data/PVE/DataCenterConfig.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied series, thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [pve-devel] [PATCH qemu-server 4/4] parse vm config: remove "\s*" from multi-line comment regex
2022-02-24 14:21 ` [pve-devel] [PATCH qemu-server 4/4] parse vm " Stefan Sterz
@ 2022-04-27 9:21 ` Thomas Lamprecht
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2022-04-27 9:21 UTC (permalink / raw)
To: Proxmox VE development discussion, Stefan Sterz
On 24.02.22 15:21, Stefan Sterz wrote:
> To be consistent with PBS's implementation of multi-line comments
> remove "\s*" here too. Since the regex isn't lazy .* matches
> everything \s* would anyway. (Note that new lines occurs after "$").
>
> Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
> ---
> PVE/QemuServer.pm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 243c2e5..79900e8 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -1,4 +1,4 @@
> -package PVE::QemuServer;
> +rpackage PVE::QemuServer;
^^^^ seems you fell on the keyboard there ;-) followed that up in git
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-04-27 9:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from comment regex Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH manager 2/4] parse node " Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH container 3/4] parse pct config: remove "\s*" from multi-line " Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH qemu-server 4/4] parse vm " Stefan Sterz
2022-04-27 9:21 ` Thomas Lamprecht
2022-04-27 6:56 ` [pve-devel] applied-series: [PATCH cluster 1/4] parse datacenter config: remove "\s*" from " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox