pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysutils/macchina



On Fri, 26 Mar 2021 at 12:30, voidpin <voidpin%protonmail.com@localhost> wrote:
>
> Hi,
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Friday, March 26, 2021 11:25 AM, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>
> > Hi,
> >
> > A small patch is needed for libmacchina crate:
> >
> > ➜ macchina diff -u
> > work/vendor/libmacchina-0.1.3.SAFE/src/netbsd/mod.rs
> > work/vendor/libmacchina-0.1.3/src/netbsd/mod.rs
> > --- work/vendor/libmacchina-0.1.3.SAFE/src/netbsd/mod.rs 1970-01-01
> > 01:00:00.000000000 +0100
> > +++ work/vendor/libmacchina-0.1.3/src/netbsd/mod.rs 2021-03-26
> > 10:19:28.717466642 +0000
> > @@ -44,6 +44,7 @@
> > .get(1)
> > .map_or("", |m| m.as_str())
> > .to_string()
> >
> > -                              .replace(" ","")
> >                                .replace("%", "");
> >                            let percentage_f = percentage.parse::<f32>().unwrap();
> >
> >                            let percentage_i = percentage_f.round() as u8;
> >
> >
> >
> > (envstat inserts a space when the battery is low, which crashes).
>
> How low does it have to reach before this happens? I never let my battery go under 25 - 30% so I've never experienced this.

 envstat  | grep -i charge
            charge:     0.000                      3.571%   1.786%   Ah ( 0.00%)

The battery of my laptop is practically dead... The space before 0.00%
is what is causing the problem.

>
> > The pull request was accepted upstream, but I have no idea how to get
> > the modified crate.
>
>
> I've been working closely with macchina devs to have NetBSD support implemented from the very beginning, they have been very responsive.
>
> I know how to patch a crate and could do it but, if the patch has already been merged, wouldn't it be better to just leave it as is?
> Next release should be fine then.

I'd say so, I mentioned it in case someone else hits the same.

>
> Regards,
> pin



-- 
----


Home | Main Index | Thread Index | Old Index