[pacman-dev] [PATCH] Add short options for mark as deps or explicit
Dan McGee
dpmcgee at gmail.com
Thu Mar 7 10:29:55 EST 2013
On Thu, Mar 7, 2013 at 9:08 AM, Sébastien Luttringer <seblu at seblu.net> wrote:
> On Thu, Mar 7, 2013 at 6:32 AM, Allan McRae <allan at archlinux.org> wrote:
>> On 07/03/13 15:30, Andrew Gregory wrote:
>>> On 03/07/13 at 02:51pm, Allan McRae wrote:
>>>> On 07/03/13 06:31, Dan McGee wrote:
>>>>> On Wed, Mar 6, 2013 at 2:19 PM, William Giokas <1007380 at gmail.com> wrote:
>>>>>> On Tue, Mar 05, 2013 at 02:03:14AM +0100, Sébastien Luttringer wrote:
>>>>>>> The main (only) purpose of -D is to be able to change packages installation
>>>>>>> status (deps or explicit). Having a short form offer a similar experience that
>>>>>>> other main pacman option (e.g. Su).
>>>>>>>
>>>>>>> Signed-off-by: Sébastien Luttringer <seblu at seblu.net>
>>>>>>
>>>>>> The --asdeps option for -S and -U does not have a shortopt. In my
>>>>>> worthess opinion, this is a bad idea, as -d for those operations is
>>>>>> --nodeps.
>>>>>
>>>>> This was my thought as well. If we are willing to use a shortopt, it
>>>>> should apply to ALL top-level operations in the same fashion (or be
>>>>> rejected completely), and not mislead. -Q/--query match this criteria,
>>>>> but currently -d for -U/-S would be totally unexpected. So -1 from me.
>>>>>
>>>>> I have consciously made decisions over the past 3 years to not add new
>>>>> shortopts unless they are universally applicable, so this would be a
>>>>> step against that. If we were to do this, we would want to remove the
>>>>> -d shortopt for --nodeps in the next release, and then add these in
>>>>> the following release. However, this is cumbersome as `--nodeps
>>>>> --nodeps` is really silly to type out as we allow this option to be
>>>>> passed twice for even more dep-ignoring behavior.
>>>>>
>>>>
>>>> I made the decision to take this based on:
>>>>
>>>> 1) it would be good to have a short options
>>>> 2) the short letters made sense
>>>> 3) the current usage of -d/-e in -Q is fairly similar
>>>> 4) the current usage of -d in -S is an operation that is unrelated to -D
>>>> so will not cause confusion.
>>>>
>>>>
>>>> People manage to understand that -Sd is different from -Qd. Why the
>>>> need to enforce consistency when there is already none?
>>>>
>>>> Allan
>>>
>>> I think that the problem is not just that -d means different things for
>>> different operations, but that --asdeps and --asexplicit shorten differently
>>> based on the operation. A user would likely see that --asdeps shortens to -d
>>> with -D and assume it to do the same for -S because --asdeps is a valid option
>>> there too. A short option may mean different things for different operations,
>>> but all operations that accept a particular long option should use the same
>>> short option for it.
>>>
>>
>> OK. I separate out the --asdep for -S/-U and -D mentally because they
>> are doing completely different things. But I see the point.
>>
> ok, we can use -e to explicit deps, as it's not used on -S/-U/-D
> (which have all --asexplicit).
>
> -d is used by --nodeps, do you have a suggestion for a short option
> for --asdeps?
Not every operation deserves a shortopt; these are used so much less
than other operations that I don't feel the loss of self-explanation
is worth it.
-Dan
More information about the pacman-dev
mailing list