From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 250901382C5 for ; Sat, 13 Mar 2021 12:44:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 627ECE0882; Sat, 13 Mar 2021 12:44:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4B9F0E0882 for ; Sat, 13 Mar 2021 12:44:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C8A6340B54 for ; Sat, 13 Mar 2021 12:44:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 81981586 for ; Sat, 13 Mar 2021 12:44:23 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1615639378.2cff8ef68b128ffe8f2074a6a8a58795ab7f06b4.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/ X-VCS-Repository: proj/portage-utils X-VCS-Files: libq/tree.c X-VCS-Directories: libq/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 2cff8ef68b128ffe8f2074a6a8a58795ab7f06b4 X-VCS-Branch: master Date: Sat, 13 Mar 2021 12:44:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7ba9d5e9-9ed8-4d92-85e3-2546eccb14d7 X-Archives-Hash: 102a0ab7387d5c22c2e1b68bbcbfc625 commit: 2cff8ef68b128ffe8f2074a6a8a58795ab7f06b4 Author: Fabian Groffen gentoo org> AuthorDate: Sat Mar 13 12:42:58 2021 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Mar 13 12:42:58 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2cff8ef6 libq/tree: fix tree_match_atom when returning newest match we were not evaluating any versions after the first we've seen for each package, disallowing us to match any but the most recent version Signed-off-by: Fabian Groffen gentoo.org> libq/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libq/tree.c b/libq/tree.c index 9b06720..a947735 100644 --- a/libq/tree.c +++ b/libq/tree.c @@ -1758,8 +1758,8 @@ tree_match_atom(tree_ctx *ctx, depend_atom *query, int flags) n->meta = tree_pkg_read(pkg_ctx); \ n->next = ret; \ ret = n; \ + lastpn = atom->PN; \ } \ - lastpn = atom->PN; \ if (flags & TREE_MATCH_FIRST && ret != NULL) \ break; \ } \