[pacman-dev] [PATCH] libalpm/sync.c: restrict alpm_sync_newversion by USAGE_UPGRADE

Erich Eckner arch at eckner.net
Tue Jul 24 19:23:56 UTC 2018


On 24.07.2018 20:48, Dave Reisner wrote:
> On Tue, Jul 24, 2018 at 05:53:00PM +0100, morganamilo wrote:
>> Commit 106d0fc54 Added the usage option for databases and
>> alpm_sync_newversion was restricted by USAGE_SEARCH instead of
>> USAGE_UPGRADE.
> 
> I don't recall exactly what my thinking was when I wrote this patch, but
> looking at 'pacman -Qu' output right now, I think I actually I like
> seeing potential upgrades, not just "actual" upgrades.
> 
> Anyone else have an opinion?

Frankly, I don't really understand what would change - what does "the
database Has the Upgrade option" mean? What is the difference between an
"actual" and a "potential" upgrade?

Please exuse if these are stupid questions - I'm just a user of "-Qu".

regards,
Erich

> 
>> USAGE_UPGRADE should be used instead. This means packages only show up
>> in commands such as `pacman -Qu` if the database Has the Upgrade option.
>>
>> Signed-off-by: morganamilo <morganamilo at gmail.com>
>>
>> diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
>> index 696a5131..23b0ccfa 100644
>> --- a/lib/libalpm/sync.c
>> +++ b/lib/libalpm/sync.c
>> @@ -61,7 +61,7 @@ alpm_pkg_t SYMEXPORT *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_syn
>>  
>>  	for(i = dbs_sync; !spkg && i; i = i->next) {
>>  		alpm_db_t *db = i->data;
>> -		if(!(db->usage & ALPM_DB_USAGE_SEARCH)) {
>> +		if(!(db->usage & ALPM_DB_USAGE_UPGRADE)) {
>>  			continue;
>>  		}
>>  
>> -- 
>> 2.18.0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20180724/1100ee2b/attachment.asc>


More information about the pacman-dev mailing list