[pacman-dev] [PATCH] pacman/query: print ignored for updates in databases without usage upgrade
Updates in databases that are not "Usage = Upgrade" will be ignored in a -Su operation. Add [ignored] to the -Qu output for such updates. Fixes FS#59854 Signed-off-by: Michael Straube <michael.straube@posteo.de> --- src/pacman/query.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pacman/query.c b/src/pacman/query.c index 00c39638..405dc61a 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -325,10 +325,12 @@ 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)); printf(" -> %s%s%s", colstr->version, alpm_pkg_get_version(newpkg), colstr->nocolor); - if(alpm_pkg_should_ignore(config->handle, pkg)) { + alpm_db_get_usage(alpm_pkg_get_db(newpkg), &usage); + if(alpm_pkg_should_ignore(config->handle, pkg) || !(usage & ALPM_DB_USAGE_UPGRADE)) { printf(" %s", _("[ignored]")); } } -- 2.20.0
On 17/12/18 4:24 am, Michael Straube wrote:
Updates in databases that are not "Usage = Upgrade" will be ignored in a -Su operation. Add [ignored] to the -Qu output for such updates.
Fixes FS#59854
There was discussion about this task when a previous patch was submitted: https://patchwork.archlinux.org/patch/752/ And the earlier patch mentioned: https://patchwork.archlinux.org/patch/704/ Allan
Am 18.12.18 um 01:49 schrieb Allan McRae:
On 17/12/18 4:24 am, Michael Straube wrote:
Updates in databases that are not "Usage = Upgrade" will be ignored in a -Su operation. Add [ignored] to the -Qu output for such updates.
Fixes FS#59854
There was discussion about this task when a previous patch was submitted:
https://patchwork.archlinux.org/patch/752/
And the earlier patch mentioned:
https://patchwork.archlinux.org/patch/704/
Allan
Ah, I missed that. Thank you for the links.
participants (2)
-
Allan McRae
-
Michael Straube