[pacman-dev] [PATCH 0/3] Add "Usage" option for repos

Allan McRae allan at archlinux.org
Tue Sep 3 02:02:07 EDT 2013


On 21/08/13 11:57, Dave Reisner wrote:
> On Mon, Aug 05, 2013 at 11:17:13AM +1000, Allan McRae wrote:
>> On 05/08/13 03:25, Dave Reisner wrote:
>>> I've been using these patches for a while now (see the author date on the
>>> actual patches) and would like to present them again for feedback. I've
>>> found it tremendously useful (particularly as an Arch packager) to be able
>>> to keep an eye on other repos like [staging] without actually having them
>>> enabled.
>>>
>>
>> I like these patches, and I believe I had the last version of them on my
>> working branch for a while.   I have just one comment for some discussion:
>>
>>
>>> +*Usage =* ...::
>>> +	Set the usage level for this repository. This option takes a list of
>> tokens
>>> +	which must be at least one of the following:
>>> +		*Sync*;;
>>> +			Enables refreshes for this repository.
>>> +		*Search*;;
>>> +			Enables searching for this repository.
>>> +		*Install*;;
>>> +			Enables installation of packages from this repository during a
>> '\--sync'
>>> +			operation.
>>> +		*Upgrade*;;
>>> +			Allows this repository to be a valid source of packages when
>> performing
>>> +			a '\--sysupgrade'.
>>> +		*All*;;
>>> +			Enables all of the above features for the repository. This is the
>> default
>>> +			if not specified.
>>
>> I think the description here needs to be clearer.   Sync allows use to
>> list the contents of the repo with -Sl?
> 
> Acting on a repo explicitly should ignore usage. I suppose I could make
> that clear.
> 
>> Search, Install and Upgrade obviously imply Sync.  Does Install only
>> allow explicit installation - i.e.  "-S repo/foo", or is "-S foo" enough?
> 
> If you set 'Install' for Usage, '-S foo' is sufficient.
> 
>> Is Upgrade different from All?  I would assume it implies Install (just
>> by description).
> 
> -U has no concept of repos. Usage isn't relevant here.
> 
>>
>>
>> So here is my suggestion.  Can we put these in an order where the higher
>> up ones imply everything below?
>>
>> Sync < Search < Install < Upgrade == All
>>
>> Allan
> 
> Hrmm. So, I suspect that 'Sync Search' will be the common alternative as
> 'Sync' or 'Search' on their own are not very useful, though 'Sync' alone
> will still allow for -S $repo/$pkg. 'Install' without 'Sync' *and*
> 'Search' isn't very useful either, but if you want the effects of all 3
> of these, you simply don't specify usage.
> 
> I'm +0 on the idea of adding a hierarchy. Anyone else have an opinion?

On IRC we discussed not adding the hierarchy and adding some more
documentation.

@Dave: are the patches on your branch good to go now?

Allan




More information about the pacman-dev mailing list