1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-21 23:38:49 -05:00

Handle provides with -Q

It is useful to be able to use "pacman -Qi" on any dependency, even if that
dependency is a provide.  For example, on Arch Linux systems, "sh" is provided
by the "bash" package, and many packages depend on "sh". Querying the
package that provides the "sh" dependency currently requires first searching
for "sh".

This patch allows the use of "pacman -Qi" on a provide.

Fixes FS#20650.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2016-04-02 16:05:55 +10:00
parent 502e0d1db0
commit 7d1ea0b814

View File

@ -468,6 +468,9 @@ int pacman_query(alpm_list_t *targets)
}
} else {
pkg = alpm_db_get_pkg(db_local, strname);
if(pkg == NULL) {
pkg = alpm_find_satisfier(alpm_db_get_pkgcache(db_local), strname);
}
if(pkg == NULL) {
pm_printf(ALPM_LOG_ERROR,