Re: mailgw argument parsing

"John P. Rouillard" <[email protected]> Tue, 22 Nov 2022 13:34:08 -0500
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
Hi Thomas:

In message <[email protected]>,
Thomas Arendsen Hein writes:
>* Ralf Schlatterbeck <[email protected]> [20221121 15:45]:
>> So to set several properties on e.g. issue and user you would use
>> 
>> -C issue -S issueprop1=value1 -S issueprop2=value2 -C user -S userprop=uvalue
>
>> So I'd suggest we change this to only a -S (--set-value) option that
>> optionally takes a classname before a '.', the above would become:
>> 
>> -S issue.issueprop1=value1 -S issue.issueprop2=value2 -S user.userprop=uvalue
>
>> What do you think?
>
>Your suggestion looks good, much more intuitive, and since old calls
>will show an error, this should not cause silent misbehavior.

One thing to note is that nobody is typing a roundup-mailgw command
line to the shell. These commands are often buried in .forward,
/etc/aliases, /etc/procmailrcs/*, /etc/procmailrc, or other config
files (don't ask) used by the mail system. Where those errors go is
well....

Also because there are still distributions that package Roundup, not
everybody reads the upgrading doc as well as they should.

So I would like to keep the -C to set the default class for -S.  So if
the -S argument doesn't have a "class." prefix, it uses the class set
by -C.

This would be a a backwards compatibility mechanism.  We should mark
-C depricated so it is not used in new installations. lso as I
mentioned only one insance of -C and -S was ever documented to
work. So if somebody does have multiple -C settings ... eeh I'm less
concerned.

As Ralf points out in a later email:

   -S 'issue.issueprop1=value1;issueprop2=value2'

is valid to set multiple props with ';' as a separator. Again this
should be supported but depricated. The docs I think reference the
syntax for setting props on the Subject line of an email. That should
be removed so new installs don't use it. Multiple -S options I think
makes more sense even if it doesn't reuse an existing (standard)
method.

Thoughts?

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.