[pacman-dev] change to option handling for --debug and -v
dpmcgee at gmail.com
Sun Mar 20 12:10:54 EDT 2011
On Sat, Mar 19, 2011 at 2:44 PM, Ray Kohler <ataraxia937 at gmail.com> wrote:
> On Sat, Mar 19, 2011 at 1:21 PM, Dave Reisner <d at falconindy.com> wrote:
>> On Sat, Mar 19, 2011 at 12:10:58PM -0400, Ray Kohler wrote:
>>> I noticed a change in the way 3.5 processes some of its command-line
>>> flags: It used to be that --debug and -v were handled immediately,
>>> such that their initial output appeared before pacman complained of a
>>> usage error. Now, it errors out immediately.
>>> This may seem like an unimportant case, but it actually breaks pkgfile
>>> from pkgtools, which runs both "pacman -v" and "pacman --debug"
>>> without any further arguments (so it can parse the output). As I
>>> haven't seen any bug report, any update to pkgfile from Daenyth, or
>>> any other comment, I thought I'd ask if this was intentional, and
>>> whether it is pacman, or pkgfile, that ought to change.
>> I worked with Daenyth to resolve this back in January:
> Ah, I didn't look far enough back in that repo to see it. Good idea
> using -T, I had forgotten about it. (And it's worth mentioning that it
> doesn't appear in pacman's usage message.)
>>> I found it actually easy to work around, by modifying pkgfile to use a
>>> -Q main operation in both of these cases.
>>> If I haven't made myself clear, try doing just "pacman -v" or "pacman
>>> --debug" on both 3.4.x and 3.5.0.
>> Personally, I'm not sure how important this is given that pkgfile got
>> bitten by parsing something it shouldn't be parsing. I'd actually vote
>> to move output generated by -v into --debug, since the verbose flag is
>> _only_ used for this one output.
> I rather agree that this is a case of something being used as an
> interface, that was never intended as such. So it's certainly not an
> obvious regression, or anything worth any blame to the pacman devs.
Parsing --debug output is definitely a no-no, we make no promises
about that not changing.
-v/--verbose on the other hand is probably a regression, albeit not
one we care about that much. I also agree it is odd we only do one
little small thing with this flag...
More information about the pacman-dev