From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7986613829C for ; Mon, 6 Jun 2016 21:15:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9F19E06FE; Mon, 6 Jun 2016 21:15:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 98B2EE06FE for ; Mon, 6 Jun 2016 21:15:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A6D27340CAA for ; Mon, 6 Jun 2016 21:15:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ADF46975 for ; Mon, 6 Jun 2016 21:15:49 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1465247667.d158f2e656bd72f01b72bb94cb734fb1021934b5.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: bin/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: bin/glsa-check X-VCS-Directories: bin/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: d158f2e656bd72f01b72bb94cb734fb1021934b5 X-VCS-Branch: master Date: Mon, 6 Jun 2016 21:15:49 +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-Archives-Salt: d78a16b3-e6ee-479f-aa0a-7ad4794a9d26 X-Archives-Hash: c8cca3a4b925a271878a29fde07a7d14 commit: d158f2e656bd72f01b72bb94cb734fb1021934b5 Author: Paul Varner gentoo org> AuthorDate: Mon Jun 6 21:14:27 2016 +0000 Commit: Paul Varner gentoo org> CommitDate: Mon Jun 6 21:14:27 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=d158f2e6 glsa-check: Apply list only affected versions patch from bug 400763 Author: Roland Hopferwieser int0x80.at> X-Gentoo-bug: 400763 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=400763 bin/glsa-check | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/glsa-check b/bin/glsa-check index 46088d7..3f691b8 100755 --- a/bin/glsa-check +++ b/bin/glsa-check @@ -240,11 +240,15 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr, encoding="utf-8"): if len(myglsa.packages) > 3: fd1.write("... ") else: - for pkg in myglsa.packages.keys(): - mylist = vardb.match(portage.dep_getkey(str(pkg))) + for cpv in myglsa.packages.keys(): + pkg = myglsa.packages[cpv] + for path in pkg: + v_installed = reduce(operator.add, [match(v, "vartree") for v in path["vul_atoms"]], []) + u_installed = reduce(operator.add, [match(u, "vartree") for u in path["unaff_atoms"]], []) + mylist = sorted(set(v_installed).difference(set(u_installed))) if len(mylist) > 0: - pkg = color(" ".join(mylist)) - fd1.write(" " + pkg + " ") + cpv = color(" ".join(mylist)) + fd1.write(" " + cpv + " ") fd1.write(")") if list_cve: