From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R00V1-0005eh-7R for garchives@archives.gentoo.org; Sun, 04 Sep 2011 00:23:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E0DE621C0EA; Sun, 4 Sep 2011 00:23:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B3FAD21C0EA for ; Sun, 4 Sep 2011 00:23:34 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A97C91B402F for ; Sun, 4 Sep 2011 00:23:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id AFFD280042 for ; Sun, 4 Sep 2011 00:23:32 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <59991c66613e7a05e363e32d48bf6ac3918b31a6.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/repoman X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 59991c66613e7a05e363e32d48bf6ac3918b31a6 Date: Sun, 4 Sep 2011 00:23:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 8a158db8080c3690c7f6825466927846 commit: 59991c66613e7a05e363e32d48bf6ac3918b31a6 Author: Zac Medico gentoo org> AuthorDate: Sun Sep 4 00:22:25 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Sep 4 00:22:25 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D59991c66 Fix repoman dependency.unknown to use xmatch. This solves the issues discussed in bug #381087, comment #8. --- bin/repoman | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/repoman b/bin/repoman index 6ec84e5..6aaeef3 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1663,7 +1663,7 @@ for x in scanlist: # packages that have empty KEYWORDS. arches.append(['**', '**', ['**']]) =20 - unknown_pkgs =3D {} + unknown_pkgs =3D set() baddepsyntax =3D False badlicsyntax =3D False badprovsyntax =3D False @@ -1700,10 +1700,9 @@ for x in scanlist: if atom =3D=3D "||": continue =20 - if not portdb.cp_list(atom.cp) and \ + if not portdb.xmatch("match-all", atom) and \ not atom.cp.startswith("virtual/"): - unknown_pkgs.setdefault(atom.cp, set()).add( - (mytype, atom.unevaluated_atom)) + unknown_pkgs.add((mytype, atom.unevaluated_atom)) =20 is_blocker =3D atom.blocker =20 @@ -1948,12 +1947,16 @@ for x in scanlist: =20 if success: if atoms: + + # Don't bother with dependency.unknown for + # cases in which *DEPEND.bad is triggered. for atom in atoms: + # dep_check returns all blockers and they + # aren't counted for *DEPEND.bad, so we + # ignore them here. if not atom.blocker: - # Don't bother with dependency.unknown - # for cases in which *DEPEND.bad is - # triggered. - unknown_pkgs.pop(atom.cp, None) + unknown_pkgs.discard( + (mytype, atom.unevaluated_atom)) =20 if not prof.sub_path: # old-style virtuals currently aren't @@ -1984,10 +1987,8 @@ for x in scanlist: prof, repr(atoms))) =20 if not baddepsyntax and unknown_pkgs: - all_unknown =3D set() - all_unknown.update(*unknown_pkgs.values()) type_map =3D {} - for mytype, atom in all_unknown: + for mytype, atom in unknown_pkgs: type_map.setdefault(mytype, set()).add(atom) for mytype, atoms in type_map.items(): stats["dependency.unknown"] +=3D 1