* [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 @ 2023-06-28 15:40 Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ Christian Ebner ` (4 more replies) 0 siblings, 5 replies; 8+ messages in thread From: Christian Ebner @ 2023-06-28 15:40 UTC (permalink / raw) To: pbs-devel Sets failure messages to be bold and fixes whitespace issues and typos Christian Ebner (3): pbs2to3: fix typo s/neighter/neither/ pbs2to3: fix whitespaces pbs2to3: set failure messages to bold src/bin/pbs2to3.rs | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) -- 2.30.2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ 2023-06-28 15:40 [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner @ 2023-06-28 15:40 ` Christian Ebner 2023-06-29 6:59 ` Lukas Wagner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 2/3] pbs2to3: fix whitespaces Christian Ebner ` (3 subsequent siblings) 4 siblings, 1 reply; 8+ messages in thread From: Christian Ebner @ 2023-06-28 15:40 UTC (permalink / raw) To: pbs-devel Signed-off-by: Christian Ebner <c.ebner@proxmox.com> --- src/bin/pbs2to3.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pbs2to3.rs b/src/bin/pbs2to3.rs index a3aa2816..168c9f00 100644 --- a/src/bin/pbs2to3.rs +++ b/src/bin/pbs2to3.rs @@ -296,7 +296,7 @@ impl Checker { if suite != OLD_SUITE && suite != NEW_SUITE { let location = repo_file.path.clone().unwrap_or_default(); self.output.log_notice(format!( - "found unusual suite '{suite}', neighter old '{OLD_SUITE}' nor new \ + "found unusual suite '{suite}', neihter old '{OLD_SUITE}' nor new \ '{NEW_SUITE}'..\n Affected file {location}\n Please \ assure this is shipping compatible packages for the upgrade!" ))?; -- 2.30.2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ Christian Ebner @ 2023-06-29 6:59 ` Lukas Wagner 2023-06-29 7:10 ` Christian Ebner 0 siblings, 1 reply; 8+ messages in thread From: Lukas Wagner @ 2023-06-29 6:59 UTC (permalink / raw) To: Proxmox Backup Server development discussion, Christian Ebner On 6/28/23 17:40, Christian Ebner wrote: > Signed-off-by: Christian Ebner <c.ebner@proxmox.com> > --- > src/bin/pbs2to3.rs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/bin/pbs2to3.rs b/src/bin/pbs2to3.rs > index a3aa2816..168c9f00 100644 > --- a/src/bin/pbs2to3.rs > +++ b/src/bin/pbs2to3.rs > @@ -296,7 +296,7 @@ impl Checker { > if suite != OLD_SUITE && suite != NEW_SUITE { > let location = repo_file.path.clone().unwrap_or_default(); > self.output.log_notice(format!( > - "found unusual suite '{suite}', neighter old '{OLD_SUITE}' nor new \ > + "found unusual suite '{suite}', neihter old '{OLD_SUITE}' nor new \ s/neihter/neither/ ? :D > '{NEW_SUITE}'..\n Affected file {location}\n Please \ > assure this is shipping compatible packages for the upgrade!" > ))?; -- - Lukas ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ 2023-06-29 6:59 ` Lukas Wagner @ 2023-06-29 7:10 ` Christian Ebner 0 siblings, 0 replies; 8+ messages in thread From: Christian Ebner @ 2023-06-29 7:10 UTC (permalink / raw) To: Lukas Wagner, Proxmox Backup Server development discussion Oops, good catch! :D Cheers, Chris > On 29.06.2023 08:59 CEST Lukas Wagner <l.wagner@proxmox.com> wrote: > > > On 6/28/23 17:40, Christian Ebner wrote: > > Signed-off-by: Christian Ebner <c.ebner@proxmox.com> > > --- > > src/bin/pbs2to3.rs | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/bin/pbs2to3.rs b/src/bin/pbs2to3.rs > > index a3aa2816..168c9f00 100644 > > --- a/src/bin/pbs2to3.rs > > +++ b/src/bin/pbs2to3.rs > > @@ -296,7 +296,7 @@ impl Checker { > > if suite != OLD_SUITE && suite != NEW_SUITE { > > let location = repo_file.path.clone().unwrap_or_default(); > > self.output.log_notice(format!( > > - "found unusual suite '{suite}', neighter old '{OLD_SUITE}' nor new \ > > + "found unusual suite '{suite}', neihter old '{OLD_SUITE}' nor new \ > s/neihter/neither/ ? :D > > '{NEW_SUITE}'..\n Affected file {location}\n Please \ > > assure this is shipping compatible packages for the upgrade!" > > ))?; > > -- > - Lukas ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pbs-devel] [PATCH backup stable-2 2/3] pbs2to3: fix whitespaces 2023-06-28 15:40 [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ Christian Ebner @ 2023-06-28 15:40 ` Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 3/3] pbs2to3: set failure messages to bold Christian Ebner ` (2 subsequent siblings) 4 siblings, 0 replies; 8+ messages in thread From: Christian Ebner @ 2023-06-28 15:40 UTC (permalink / raw) To: pbs-devel Signed-off-by: Christian Ebner <c.ebner@proxmox.com> --- src/bin/pbs2to3.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pbs2to3.rs b/src/bin/pbs2to3.rs index 168c9f00..d85551ec 100644 --- a/src/bin/pbs2to3.rs +++ b/src/bin/pbs2to3.rs @@ -401,7 +401,7 @@ impl Checker { } else if self.get_systemd_unit_state("ntp.service")?.1 == SystemdUnitState::Active { self.output.log_info( "Debian deprecated and removed the ntp package for Bookworm, but the system \ - will automatically migrate to the 'ntpsec' replacement package on upgrade.", + will automatically migrate to the 'ntpsec' replacement package on upgrade.", )?; } else if self.get_systemd_unit_state("chrony.service")?.1 == SystemdUnitState::Active || self.get_systemd_unit_state("openntpd.service")?.1 == SystemdUnitState::Active -- 2.30.2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pbs-devel] [PATCH backup stable-2 3/3] pbs2to3: set failure messages to bold 2023-06-28 15:40 [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 2/3] pbs2to3: fix whitespaces Christian Ebner @ 2023-06-28 15:40 ` Christian Ebner 2023-06-28 16:01 ` [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner 2023-06-29 5:54 ` [pbs-devel] applied-series: " Thomas Lamprecht 4 siblings, 0 replies; 8+ messages in thread From: Christian Ebner @ 2023-06-28 15:40 UTC (permalink / raw) To: pbs-devel Signed-off-by: Christian Ebner <c.ebner@proxmox.com> --- src/bin/pbs2to3.rs | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/bin/pbs2to3.rs b/src/bin/pbs2to3.rs index d85551ec..54504a39 100644 --- a/src/bin/pbs2to3.rs +++ b/src/bin/pbs2to3.rs @@ -485,9 +485,9 @@ impl ConsoleOutput { Ok(()) } - pub fn set_color(&mut self, color: Color) -> Result<(), Error> { + pub fn set_color(&mut self, color: Color, bold: bool) -> Result<(), Error> { self.stream - .set_color(ColorSpec::new().set_fg(Some(color)))?; + .set_color(ColorSpec::new().set_fg(Some(color)).set_bold(bold))?; Ok(()) } @@ -495,9 +495,9 @@ impl ConsoleOutput { match level { LogLevel::Pass => { self.counters.pass += 1; - self.set_color(Color::Green)?; + self.set_color(Color::Green, false)?; writeln!(&mut self.stream, "PASS: {}", message)?; - self.set_color(Color::White)?; + self.set_color(Color::White, false)?; } LogLevel::Info => { writeln!(&mut self.stream, "INFO: {}", message)?; @@ -508,19 +508,21 @@ impl ConsoleOutput { } LogLevel::Notice => { self.counters.notice += 1; + self.set_color(Color::White, true)?; writeln!(&mut self.stream, "NOTICE: {}", message)?; + self.set_color(Color::White, false)?; } LogLevel::Warn => { self.counters.warn += 1; - self.set_color(Color::Yellow)?; + self.set_color(Color::Yellow, true)?; writeln!(&mut self.stream, "WARN: {}", message)?; - self.set_color(Color::White)?; + self.set_color(Color::White, false)?; } LogLevel::Fail => { self.counters.fail += 1; - self.set_color(Color::Red)?; + self.set_color(Color::Red, true)?; writeln!(&mut self.stream, "FAIL: {}", message)?; - self.set_color(Color::White)?; + self.set_color(Color::White, false)?; } } Ok(()) @@ -559,28 +561,29 @@ impl ConsoleOutput { + self.counters.skip + self.counters.warn; - self.set_color(Color::White)?; + self.set_color(Color::White, false)?; writeln!(&mut self.stream, "TOTAL: {total}")?; - self.set_color(Color::Green)?; + self.set_color(Color::Green, false)?; writeln!(&mut self.stream, "PASSED: {}", self.counters.pass)?; - self.set_color(Color::White)?; + self.set_color(Color::White, false)?; writeln!(&mut self.stream, "SKIPPED: {}", self.counters.skip)?; writeln!(&mut self.stream, "NOTICE: {}", self.counters.notice)?; if self.counters.warn > 0 { - self.set_color(Color::Yellow)?; + self.set_color(Color::Yellow, false)?; writeln!(&mut self.stream, "WARNINGS: {}", self.counters.warn)?; } if self.counters.fail > 0 { - self.set_color(Color::Red)?; + self.set_color(Color::Red, true)?; writeln!(&mut self.stream, "FAILURES: {}", self.counters.fail)?; } if self.counters.warn > 0 || self.counters.fail > 0 { - let mut color = Color::Yellow; - if self.counters.fail > 0 { - color = Color::Red; - } + let (color, bold) = if self.counters.fail > 0 { + (Color::Red, true) + } else { + (Color::Yellow, false) + }; - self.set_color(color)?; + self.set_color(color, bold)?; writeln!( &mut self.stream, "\nATTENTION: Please check the output for detailed information!", @@ -592,7 +595,7 @@ impl ConsoleOutput { )?; } } - self.set_color(Color::White)?; + self.set_color(Color::White, false)?; Ok(()) } } -- 2.30.2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 2023-06-28 15:40 [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner ` (2 preceding siblings ...) 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 3/3] pbs2to3: set failure messages to bold Christian Ebner @ 2023-06-28 16:01 ` Christian Ebner 2023-06-29 5:54 ` [pbs-devel] applied-series: " Thomas Lamprecht 4 siblings, 0 replies; 8+ messages in thread From: Christian Ebner @ 2023-06-28 16:01 UTC (permalink / raw) To: pbs-devel Please ignore this one and see updated v2 instead. Thx > On 28.06.2023 17:40 CEST Christian Ebner <c.ebner@proxmox.com> wrote: > > > Sets failure messages to be bold and fixes whitespace issues and typos > > Christian Ebner (3): > pbs2to3: fix typo s/neighter/neither/ > pbs2to3: fix whitespaces > pbs2to3: set failure messages to bold > > src/bin/pbs2to3.rs | 45 ++++++++++++++++++++++++--------------------- > 1 file changed, 24 insertions(+), 21 deletions(-) > > -- > 2.30.2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [pbs-devel] applied-series: [PATCH backup stable-2 0/3] followup fixes for pbs2to3 2023-06-28 15:40 [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner ` (3 preceding siblings ...) 2023-06-28 16:01 ` [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner @ 2023-06-29 5:54 ` Thomas Lamprecht 4 siblings, 0 replies; 8+ messages in thread From: Thomas Lamprecht @ 2023-06-29 5:54 UTC (permalink / raw) To: Proxmox Backup Server development discussion, Christian Ebner Am 28/06/2023 um 17:40 schrieb Christian Ebner: > Sets failure messages to be bold and fixes whitespace issues and typos > > Christian Ebner (3): > pbs2to3: fix typo s/neighter/neither/ > pbs2to3: fix whitespaces > pbs2to3: set failure messages to bold > > src/bin/pbs2to3.rs | 45 ++++++++++++++++++++++++--------------------- > 1 file changed, 24 insertions(+), 21 deletions(-) > applied, thanks! ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-06-29 7:11 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-06-28 15:40 [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 1/3] pbs2to3: fix typo s/neighter/neither/ Christian Ebner 2023-06-29 6:59 ` Lukas Wagner 2023-06-29 7:10 ` Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 2/3] pbs2to3: fix whitespaces Christian Ebner 2023-06-28 15:40 ` [pbs-devel] [PATCH backup stable-2 3/3] pbs2to3: set failure messages to bold Christian Ebner 2023-06-28 16:01 ` [pbs-devel] [PATCH backup stable-2 0/3] followup fixes for pbs2to3 Christian Ebner 2023-06-29 5:54 ` [pbs-devel] applied-series: " Thomas Lamprecht
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox