[pacman-dev] [PATCH] pacman: check versioned optdepends in -Qi operation
Fixes FS#60106 Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> --- src/pacman/package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/package.c b/src/pacman/package.c index e80c5953..ee43dca7 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -170,7 +170,7 @@ static void optdeplist_display(alpm_pkg_t *pkg, unsigned short cols) alpm_depend_t *optdep = i->data; char *depstring = alpm_dep_compute_string(optdep); if(alpm_pkg_get_origin(pkg) == ALPM_PKG_FROM_LOCALDB) { - if(alpm_find_satisfier(alpm_db_get_pkgcache(localdb), optdep->name)) { + if(alpm_find_satisfier(alpm_db_get_pkgcache(localdb), depstring)) { const char *installed = _(" [installed]"); depstring = realloc(depstring, strlen(depstring) + strlen(installed) + 1); strcpy(depstring + strlen(depstring), installed); -- 2.19.0
On 19/9/18 12:08 am, Eli Schwartz wrote:
Fixes FS#60106
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> --- src/pacman/package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pacman/package.c b/src/pacman/package.c index e80c5953..ee43dca7 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -170,7 +170,7 @@ static void optdeplist_display(alpm_pkg_t *pkg, unsigned short cols) alpm_depend_t *optdep = i->data; char *depstring = alpm_dep_compute_string(optdep); if(alpm_pkg_get_origin(pkg) == ALPM_PKG_FROM_LOCALDB) { - if(alpm_find_satisfier(alpm_db_get_pkgcache(localdb), optdep->name)) { + if(alpm_find_satisfier(alpm_db_get_pkgcache(localdb), depstring)) { const char *installed = _(" [installed]"); depstring = realloc(depstring, strlen(depstring) + strlen(installed) + 1); strcpy(depstring + strlen(depstring), installed);
Looks good. A
participants (2)
-
Allan McRae
-
Eli Schwartz