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 BA380138359 for ; Sun, 4 Oct 2020 18:44:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16A81E085E; Sun, 4 Oct 2020 18:44:31 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 02082E085E for ; Sun, 4 Oct 2020 18:44:30 +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 28FE0335D51 for ; Sun, 4 Oct 2020 18:44:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C310C389 for ; Sun, 4 Oct 2020 18:44:28 +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: <1601836997.e2cb3938176e97b6e41d1873838db35a017cf7d9.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qlop.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: e2cb3938176e97b6e41d1873838db35a017cf7d9 X-VCS-Branch: master Date: Sun, 4 Oct 2020 18:44:28 +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: 18601ccc-28d8-4d75-a51d-a9de800ed3d1 X-Archives-Hash: 9ab72d84ecb105936788c3417899a696 commit: e2cb3938176e97b6e41d1873838db35a017cf7d9 Author: Fabian Groffen gentoo org> AuthorDate: Sun Oct 4 18:43:17 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Oct 4 18:43:17 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e2cb3938 qlop: fix fix for #731122, also make it work without packages specified Bug: https://bugs.gentoo.org/745798 Bug: https://bugs.gentoo.org/731122 Signed-off-by: Fabian Groffen gentoo.org> qlop.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/qlop.c b/qlop.c index a5d8678..24b154c 100644 --- a/qlop.c +++ b/qlop.c @@ -1353,12 +1353,6 @@ static array_t *probe_proc(array_t *atoms) xarraydelete_ptr(ret_atoms, j); atom_implode(atomr); break; - } else { - /* bug #731122: match running packages without - * version */ - atomr->PV = NULL; - atomr->PVR = NULL; - atomr->PR_int = 0; } } atom_implode(atom); @@ -1369,7 +1363,14 @@ static array_t *probe_proc(array_t *atoms) /* ret_atoms is allocated on the stack, so copy into atoms which is * empty at this point */ array_for_each(ret_atoms, i, atom) + { + /* bug #731122: match running packages without version */ + atom->PV = NULL; + atom->PVR = NULL; + atom->PR_int = 0; + printf("proc: %s\n", atom_to_string(atom)); xarraypush_ptr(atoms, atom); + } xarrayfree_int(ret_atoms);