[pacman-dev] [PATCH] Add [ignored] to -Qu output for packages in repos that are not Usage = Upgrade

Allan McRae allan at archlinux.org
Fri Jan 4 04:27:47 UTC 2019

On 4/1/19 2:21 pm, Allan McRae wrote:
> The behaviour of "pacman -Qu" was very strange...  It would only consider
> packages from repos with Usage = Search (or All), and ignore those with
> Usage = Sync, Install or Upgrade.
> This is because alpm_sync_newversion() used ALPM_DB_USAGE_SEARCH for its
> filtering. Given this function is documented (at least in the source) to
> "Check for new version of pkg in sync repos", I would expect that to look at
> all repos. However, just changing this parameter, would result in a fairly
> silent change in behaviour of this function.  To counter that, add a parameter
> to the function that tells it which databases usage levels to consider.
> Finally, list all available updates in -Qu output, but include [ignored] beside
> those that will not be updated in a -Su operation due to thier repo Usage
> value (in addition to those that are Ignored).
> Fixes FS#59854.
> With thanks to the following who provided initial patches to print [ignored] on
> -Qu operations, which highlighted the larger problem:
> morganamilo <morganamilo at gmail.com>
> Michael Straube <michael.straube at posteo.de>
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
> In comments on earlier patches, there was debate about what the
> alpm_sync_newversion() is doing.   Although I expect users of this function
> to likely always pass ALPM_DB_USAGE_ALL, I think changing the function
> signature is the safest way to handle this change.
> Comments?

For reference, here are other threads about this:


More information about the pacman-dev mailing list