FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 03-19-2011, 03:10 PM
Ray Kohler
 
Default change to option handling for --debug and -v

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 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.
 
Old 03-19-2011, 04:21 PM
Dave Reisner
 
Default change to option handling for --debug and -v

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

>
> 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.

dave
 
Old 03-19-2011, 06:44 PM
Ray Kohler
 
Default change to option handling for --debug and -v

On Sat, Mar 19, 2011 at 1:21 PM, Dave Reisner <d@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.
 
Old 03-20-2011, 03:10 PM
Dan McGee
 
Default change to option handling for --debug and -v

On Sat, Mar 19, 2011 at 2:44 PM, Ray Kohler <ataraxia937@gmail.com> wrote:
> On Sat, Mar 19, 2011 at 1:21 PM, Dave Reisner <d@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.

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...

-Dan
 

Thread Tools




All times are GMT. The time now is 09:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org