[pacman-dev] change to option handling for --debug and -v

Ray Kohler ataraxia937 at gmail.com
Sat Mar 19 15:44:57 EDT 2011


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:
>
> https://github.com/Daenyth/pkgtools/commit/4f7ce135cd942c77679e9212fb0ca98f4e354d9e

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.


More information about the pacman-dev mailing list