Hello,

On Thu, Sep 02, 2021 at 04:16:36AM +0200, Guillem Jover wrote:
> On Mon, 2021-03-08 at 22:35:49 -0800, Ross Vandegrift wrote:
> > dpkg-divert is too sensitive to the order of the command line parameters.
> > Since I only use it rarely, I almost always run into:
> > 
> >   # dpkg-divert --add /wooo --divert /yeah --rename
> >   dpkg-divert: warning: please specify --no-rename explicitly, the default 
> > will change to --rename in 1.20.x
> >   dpkg-divert: error: --add needs a single argument
> >   
> >   Use --help for help about diverting files.
> > 
> > The fix is to move --add last.  But neither the error nor the manpage makes
> > that clear.
> 
> Both the man page and the --help output mention that the usage is:
> 
>   dpkg-divert [<option>...] <command>
> 
> And then go to list the commands and options on their respective
> sections. While I guess I could add a hint or similar on the error
> message (because modifying the way this is parsed would be a pain),
> that seems it would be too specific for such a generic message. So
> I'm inclined to leave it as is, TBH. If you have an alternative
> suggestion I'm happy to consider, otherwise I'm afraid I'll just
> going to close the report.

I don't have any good suggestions - I think usage would be more obvious
if the commands weren't prefixed with dashes, but that would cause much
worse breakage.  If the parsing is too hard to change, then leaving it
as-is is sounds reasonable.

Thanks for thinking about it, feel free to close.

Ross

Reply via email to