Menu

#74 q not suppressing notice

1.4.4
open
nobody
unknown
3
2024-04-26
2024-04-26
Hobo Baxter
No

When I cast mbsync -q $channel this notice is not supressed Notice: Master/Slave are deprecated; use Far/Near instead.

For some reason, I have to use mbsync -qq $channel to suppress this notice. However, in the documentation it states:

-q, --quiet
              Suppress  progress  counters  (this is implicit if stdout is no TTY, or any debugging categories
              are enabled) and notices.  If specified twice, suppress warning messages as well.

This implies that this is listed as a Warning rather than a Notice. Which it does appear to be on Line 531:
warn( "Notice: Master/Slave are deprecated; use Far/Near instead.\n" );

It should likely be set to notice();instead like the rest of the notices. This can be corrected quite easily here:
sed -i '531s/warn/notice/' src/config.c
or:
sed -i '531s/Notice/Warning/' src/config.c

Thank you for your great work!
- notmyrealname

Discussion

  • Hobo Baxter

    Hobo Baxter - 2024-04-26

    Looking over the code base a bit more, it's the same thing for a few other things:

    src/main.c:742 warn( "Notice: -master/-slave/m/s suffixes are deprecated; use -far/-near/f/n instead.\n" );

    src/drv_imap.c:3724 warn( "Notice: %s '%s': UseSSL*, UseTLS*, UseIMAPS, and RequireSSL are deprecated. Use SSLType and SSLVersions instead.\n", type, name );

    src/drv_imap.c:3737 warn( "Notice: %s '%s': 'RequireSSL no' is being ignored\n", type, name );

    src/drv_imap.c: 3758warn( "Notice: %s '%s': RequireCRAM is deprecated. Use AuthMech instead.\n", type, name );

     
  • Hobo Baxter

    Hobo Baxter - 2024-04-26

    Here is my diff file with the fixes.

     
  • Oswald Buddenhagen

    yeah. i'm a bit undecided which way it should go. the thing is that these messages really are warnings, as things will break ... but only at some point in the future.

     
  • Oswald Buddenhagen

    • status: reported --> open
     

Log in to post a comment.