[pacman-dev] [PATCH] during -Qu add [ignored] for repos without Usage = Upgrade

Allan McRae allan at archlinux.org
Wed Sep 19 08:17:22 UTC 2018


On 1/9/18 9:35 am, morganamilo wrote:
> Fixes FS#59854
> 
> Signed-off-by: morganamilo <morganamilo at gmail.com>
> ---

Looks good.

A

>  src/pacman/query.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/pacman/query.c b/src/pacman/query.c
> index 00c39638..faa06e60 100644
> --- a/src/pacman/query.c
> +++ b/src/pacman/query.c
> @@ -325,10 +325,14 @@ static int display(alpm_pkg_t *pkg)
>  					colstr->version, alpm_pkg_get_version(pkg), colstr->nocolor);
>  
>  			if(config->op_q_upgrade) {
> +				int usage;
>  				alpm_pkg_t *newpkg = alpm_sync_newversion(pkg, alpm_get_syncdbs(config->handle));
> +				alpm_db_t *db = alpm_pkg_get_db(newpkg);
> +				alpm_db_get_usage(db, &usage);
> +
>  				printf(" -> %s%s%s", colstr->version, alpm_pkg_get_version(newpkg), colstr->nocolor);
>  
> -				if(alpm_pkg_should_ignore(config->handle, pkg)) {
> +				if(alpm_pkg_should_ignore(config->handle, pkg) || !(usage & ALPM_DB_USAGE_UPGRADE)) {
>  					printf(" %s", _("[ignored]"));
>  				}
>  			}
> 


More information about the pacman-dev mailing list